45 lines
1.0 KiB
Plaintext
45 lines
1.0 KiB
Plaintext
# File generated by Wizard 2.9.0 on Oct 9, 2025.
|
|
advanced_behavior UCAV_fire
|
|
|
|
script_variables
|
|
WsfWeapon missile;
|
|
WsfControlMessage msg=WsfControlMessage();
|
|
string str="";
|
|
WsfTrack track=WsfTrack();
|
|
end_script_variables
|
|
|
|
on_init
|
|
missile = PLATFORM.Weapon("blue_gps_bomb_1");
|
|
|
|
end_on_init
|
|
|
|
on_message
|
|
type WSF_CONTROL_MESSAGE
|
|
script
|
|
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=="FIRE")
|
|
{
|
|
writeln("UCAVE fire");
|
|
return true;
|
|
}
|
|
return false;
|
|
end_precondition
|
|
|
|
execute
|
|
missile.Fire(track);
|
|
writeln("fire,remain weapon:", missile.QuantityRemaining());
|
|
str="";
|
|
return Success();
|
|
end_execute
|
|
|
|
end_advanced_behavior |