Examples are based on the C-17.
We need to add a couple of things to the planes -set.xml file in order to implement paratroopers.
These lines go above the </sim> tag. The submodels.xml file will be created later on, so be sure to check the path when creating it.
<submodels> <serviceable type="bool">true</serviceable> <path>Aircraft/C-17/Submodels/submodels.xml</path> </submodels>
There are a couple more things to add below the </sim> tag.
<input> <keyboard> <key n="10"> <name>Ctrl-j</name> <desc>Jump signal</desc> <binding> <command>property-toggle</command> <property>controls/jump-signal</property> <value>true</value> <value>false</value> </binding> </key> </keyboard> </input>
Ofcourse you can use any key you prefer, but Ctrl+J is often used.
<ai> <submodels> <trigger type="bool">false</trigger> </submodels> </ai>
Below is an example of a submodels.xml file. You refer to this file in the planes -set.xml file.
<?xml version="1.0" encoding="UTF-8"?> <PropertyList> <submodel> <name>parachutist</name> <model>Models/Geometry/parachuter.xml</model> <trigger>controls/jump-signal</trigger> <speed>0</speed> <repeat>true</repeat> <delay>1.5</delay> <count>102</count> <x-offset> -5 </x-offset> <y-offset> 0 </y-offset> <z-offset> -2 </z-offset> <yaw-offset>0.0</yaw-offset> <pitch-offset>0.0</pitch-offset> <cd>1.2</cd> <eda>100</eda> <weight>200</weight> <wind>true</wind> <buoyancy>20</buoyancy> <life>600</life> </submodel> </PropertyList>
- Model: the paratrooper model. There's a generic one available at this given path, however you can create your own.
- Delay: time in seconds between each paratroopers jump.
- Count: number of paratroopers that can be seated on the aircraft.
- Offset: distance in meters to the model origin from where the paratroopers will jump (therefor the spot where the models will appear).
- Weight: weight of an average paratrooper in pounds.
- Wind: is the paratrooper affected by wind?
- Life: time in seconds that the paratrooper lasts. The model will be deleted when time is up.