迫击炮车行为树搭建完成
This commit is contained in:
46
behavior/behavior_move.txt
Normal file
46
behavior/behavior_move.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
# File generated by Wizard 2.9.0 on Sep 23, 2025.
|
||||
advanced_behavior behavior_move
|
||||
|
||||
script_variables
|
||||
WsfControlMessage msg=WsfControlMessage();
|
||||
string str="";
|
||||
WsfTrack track=WsfTrack();
|
||||
end_script_variables
|
||||
|
||||
on_init
|
||||
|
||||
end_on_init
|
||||
|
||||
on_message
|
||||
type WSF_CONTROL_MESSAGE
|
||||
script
|
||||
WsfControlMessage msg=(WsfControlMessage)MESSAGE;
|
||||
writeln("receive",msg.AuxDataString("task"));
|
||||
str=msg.AuxDataString("task");
|
||||
track=(WsfTrack)msg.AuxDataObject("track");
|
||||
writeln(str);
|
||||
end_script
|
||||
end_on_message
|
||||
|
||||
precondition
|
||||
if(str=="MOVE")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
end_precondition
|
||||
|
||||
execute
|
||||
if(!track.WithinZoneOf(PLATFORM,"battalion_sector"))
|
||||
{
|
||||
double relativeAzimuthOf=
|
||||
PLATFORM.RelativeAzimuthOf(track.CurrentLocation());
|
||||
PLATFORM.TurnToRelativeHeading(relativeAzimuthOf);
|
||||
PLATFORM.GoToSpeed(16);#m/s
|
||||
|
||||
}
|
||||
str="";
|
||||
return Success();
|
||||
end_execute
|
||||
|
||||
end_advanced_behavior
|
||||
Reference in New Issue
Block a user