• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Finally, you can manage your Google Docs, uploads, and email attachments (plus Dropbox and Slack files) in one convenient place. Claim a free account, and in less than 2 minutes, Dokkio (from the makers of PBworks) can automatically organize your content for you.


Launching Fighters

Page history last edited by Dwayne Shaffer 8 years, 4 months ago


By Dwayne Shaffer


This is a code snippet that must be added to a mission script.


Here is a code for launching and recovering fighter in the game. 

The code is based of TreChipmans Photo Topetoes. 


Set Timer are place in the start block 


<set_timer name="Red1launch" seconds="60"/> 

<set_timer name="Red2launch" seconds="65"/> 

<set_timer name="Red3launch" seconds="70"/> 

<set_timer name="Red4launch" seconds="75"/> 

<set_timer name="Red5launch" seconds="80"/>  


Next Launching Fighters



<if_exists name="CR11"/> 

<if_variable name="Red1launch" comparator="!=" value="1"/> 

<if_distance name1="CR11" name2="Vidar" comparator="<" value ="1000"/> 

<play_sound_now filename="viperlaunch.wav"/> 

<if_timer_finished name="Red1launch"/> 

<create type ="neutral" raceKeys="friendly" x="0" y="-5" z="0" hullKeys="viperMKII" angle="0" name="Red1"/> 

<copy_object_property name1="Vidar" name2="Red1" property ="angle"/> 

<copy_object_property name1="Vidar" name2="Red1" property ="x"/> 

<copy_object_property name1="Vidar" name2="Red1" property ="z"/> 

<add_ai name ="Red1" targetName="Vidar" type ="DEFEND" value1="1000" value2="500"/> 

<set_relative_position name1="Vidar" name2="Red1" angle="0" distance="215"/> 

<log text="Viper Red 1 Launched."/> 

<warning_popup_message message="Sir Red 1 launching" consoles="CHS"/> 

<set_variable name="Red1launch" value="1"/> 



Recovering Fighters



<if_exists name="Red1"/> 

<if_fleet_count fleetnumber="1" comparator="<=" value="0"/> 

<if_variable name="attack1" comparator="=" value="1"/> 

<if_distance name1="Red1" name2="Vidar" comparator="<" value ="151"/> 

<destroy name="Red1"/> 

<play_sound_now filename="viperreverse.wav"/> 

<incoming_comms_text from="Red1"> 

This is Red 1, Command. We've landed safely.^ 


<log text="Viper Red 1 Recovered."/> 

<warning_popup_message message="Viper Red 1 Recovered" consoles="CHS"/> 



TreChipman thanks for the ideas this is the only way I could get it to work in my mission script as you see the guts to your idea is still there. Thanks Again 


This is an updated Fighter launch snip Cuts the scrip down (it works) 



<if_exists name="CR11" /> 

<if_variable name="launchRedSqd" comparator="!=" value="1" /> 

<if_distance name1="CR11" name2="Vidar" comparator="LESS" value="4000" /> 

<play_sound_now filename="ViperLaunch2.wav" /> 

<create type="neutral" x="0" y="-5" z="0" angle="0" name="Red1" raceKeys="friendly" hullKeys="viperMKII" /> 

<create type="neutral" x="0" y="-6" z="0" angle="0" name="Red2" raceKeys="friendly" hullKeys="viperMKII" /> 

<create type="neutral" x="0" y="-7" z="0" angle="0" name="Red3" raceKeys="friendly" hullKeys="viperMKII" /> 

<create type="neutral" x="0" y="-8" z="0" angle="0" name="Red4" raceKeys="friendly" hullKeys="viperMKII" /> 

<create type="neutral" x="0" y="-9" z="0" angle="0" name="Red5" raceKeys="friendly" hullKeys="viperMKII" /> 

<copy_object_property property="angle" name1="Vidar" name2="Red1" /> 

<set_relative_position name2="Red1" distance="215" angle="0" name1="Vidar" /> 

<copy_object_property property="angle" name1="Vidar" name2="Red2" /> 

<set_relative_position name2="Red2" distance="220" angle="0" name1="Vidar" /> 

<copy_object_property property="angle" name1="Vidar" name2="Red3" /> 

<set_relative_position name2="Red3" distance="225" angle="0" name1="Vidar" /> 

<copy_object_property property="angle" name1="Vidar" name2="Red4" /> 

<set_relative_position name2="Red4" distance="230" angle="0" name1="Vidar" /> 

<copy_object_property property="angle" name1="Vidar" name2="Red5" /> 

<set_relative_position name2="Red5" distance="240" angle="0" name1="Vidar" /> 

<log text="Red Squadron Launched" /> 

<warning_popup_message message="Sir Red Squadron Launching" consoles="W" /> 

<set_variable name="launchRedSqd" value="1" /> 



Launching Fighters via GM Console.


Here is an update to launching fighters with the GM console being used as a station.

event one launching the squadron

<if_gm_key keyText="1" />
<play_sound_now filename="viperlaunch1.wav" />
<create type="neutral" x="0" y="-5" z="0" angle="0" name="Red Leader" hullID="1601" />
<create type="neutral" x="0" y="-6" z="0" angle="0" name="Red2" hullID="1601" />
<create type="neutral" x="0" y="-7" z="0" angle="0" name="Red3" hullID="1601" />
<create type="neutral" x="0" y="-8" z="0" angle="0" name="Red4" hullID="1602" />
<create type="neutral" x="0" y="-9.0" z="0" angle="0" name="Red5" hullID="1602" />
<copy_object_property property="angle" name1="Artemis" name2="Red Leader" />
<set_relative_position name2="Red Leader" distance="100" angle="95.0" name1="Artemis" />
<copy_object_property property="angle" name1="Artemis" name2="Red2" />
<set_relative_position name2="Red2" distance="105" angle="100.0" name1="Artemis" />
<copy_object_property property="angle" name1="Artemis" name2="Red3" />
<set_relative_position name2="Red3" distance="110" angle="110.0" name1="Artemis" />
<copy_object_property property="angle" name1="Artemis" name2="Red4" />
<set_relative_position name2="Red4" distance="115" angle="115.0" name1="Artemis" />
<copy_object_property property="angle" name1="Artemis" name2="Red5" />
<set_relative_position name2="Red5" distance="120" angle="120.0" name1="Artemis" />

in this event once the fighters are launched the code links all the fighters to the squadron leader this allow you to give comms order to the squadron leader and everyone follows. If the leader is killed the unit will be routed so comms and tactical will have work together to direct each fighter.


<if_exists name="Red Leader" />

<set_relative_position name2="Red2" distance="50" angle="120.0" name1="Red Leader" />

<copy_object_property property="angle" name1="Red Leader" name2="Red2" />

<set_relative_position name2="Red3" distance="100" angle="160.0" name1="Red Leader" />

<copy_object_property property="angle" name1="Red Leader" name2="Red3" />

<set_relative_position name2="Red4" distance="50" angle="250.0" name1="Red Leader" />

<copy_object_property property="angle" name1="Red Leader" name2="Red4" />

<set_relative_position name2="Red5" distance="100" angle="230.0" name1="Red Leader" />

<copy_object_property property="angle" name1="Red Leader" name2="Red5" />


Fuel usage:

this event sets the timers or fuel amount.

<if_exists name="Red Leader" />
<if_variable name="Red_Sqd_Launched" comparator="NOT" value="1.0" />
<set_timer name="Red_Sqd_Fuel" seconds="350" />
<set_variable name="Red_Sqd_Launched" value="1.0" />

This event had fighters return to capital ship.

<if_timer_finished name="Red_Sqd_Fuel" />
<if_variable name="Red_Sqd_Launched" comparator="EQUALS" value="1.0" />
<if_variable name="Red_Sqd_Low_fuel" comparator="NOT" value="1.0" />
<warning_popup_message message="Red Squadron Low on Fuel returning to refuel" consoles="C" />
<add_ai type="TARGET_THROTTLE" targetName="Artemis" value1="0.8" name="Red Leader" />
<add_ai type="TARGET_THROTTLE" targetName="Artemis" value1="0.8" name="Red2" />
<add_ai type="TARGET_THROTTLE" targetName="Artemis" value1="0.8" name="Red3" />
<add_ai type="TARGET_THROTTLE" targetName="Artemis" value1="0.8" name="Red4" />
<add_ai type="TARGET_THROTTLE" targetName="Artemis" value1="0.8" name="Red5" />
<set_variable name="Red_Sqd_Low_fuel" value="1.0" />

This event destroys each fighter as it get close to the capital ship (landing)

<if_timer_finished name="Red_Sqd_Fuel" />
<if_distance name1="Red Leader" name2="Artemis" comparator="LESS_EQUAL" value="200.0" />
<play_sound_now filename="viperreverse.wav" />
<destroy name="Red Leader" />

<if_timer_finished name="Red_Sqd_Fuel" />
<if_distance name1="Red2" name2="Artemis" comparator="LESS_EQUAL" value="200.0" />
<play_sound_now filename="viperreverse.wav" />
<destroy name="Red2" />

<if_timer_finished name="Red_Sqd_Fuel" />
<if_distance name1="Red3" name2="Artemis" comparator="LESS_EQUAL" value="200.0" />
<play_sound_now filename="viperreverse.wav" />
<destroy name="Red3" />

<if_timer_finished name="Red_Sqd_Fuel" />
<if_distance name1="Red4" name2="Artemis" comparator="LESS_EQUAL" value="200.0" />
<play_sound_now filename="viperreverse.wav" />
<destroy name="Red4" />

<if_timer_finished name="Red_Sqd_Fuel" />
<if_distance name1="Red5" name2="Artemis" comparator="LESS_EQUAL" value="200.0" />
<play_sound_now filename="viperreverse.wav" />
<destroy name="Red5" />

This is the update version of launching and landing fighter using the gm console.


Comments (0)

You don't have permission to comment on this page.