OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: sinchi runa on 17 Oct 2007, 09:30:33

Title: spawning paratroopers with a radio call
Post by: sinchi runa on 17 Oct 2007, 09:30:33
greetings,

i was sitting in the tower over bagango watching the 100+ bad guys and thinking how nice it would be to be able to...

click on a spot on the map... and create a group of paratroopers that drop from 100m? sort of like one click artillery, just paratroopers.

from what i can tell from the forum posts...you have to move the created unit(s) into the parachute(s) or they just fall.

i guess the main thing is.. with a script, how do i create a unit in a parachute at a height of 100m?

thanks



Title: Re: spawning paratroopers with a radio call
Post by: Spooner on 17 Oct 2007, 12:25:24
The discussion about HALO (http://www.ofpec.com/forum/index.php?topic=30233.msg207229#msg207229) has all the information you need, including how to place groups of parachutists into a nice formation.
Title: Re: spawning paratroopers with a radio call
Post by: sinchi runa on 17 Oct 2007, 19:11:38
thanks,

i have been messing with it and can't get the man to spawn in the chute.. just an empty chute falls to the marker DZ?

i put the activation on a radio trigger

[] exec "paratroopers.sqs"

paratrooper.sqs

Code: [Select]
chute = createVehicle ["ParachuteWest", position DZ, [], 0, "FLY"];
~0.2
"SoldierWPilot"createUnit [position chute,"this moveindriver chute"];


any ideas what i'm not doing right?
Title: Re: spawning paratroopers with a radio call
Post by: Spooner on 17 Oct 2007, 19:23:37
You need to assign the new person to a group or they don't actually get created (you need to check the correct syntax of createUnit (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=c#createUnit)). In the HALO examples, the soldiers join the group with the player:
Code: [Select]
"SoldierWPilot" createUnit [position chute, group player, "this moveInDriver chute"];

But you may prefer to have them in a new group:
Code: [Select]
_newGroup = createGroup west;
"SoldierWPilot" createUnit [position chute, _newGroup, "this moveInDriver chute"];

Remember that we were using a pilot for the HALO jump since they looked more like a skydiver but that you'll have to re-equip him or use a more combat-worthy paratrooper (see the COMREF for soldier types).
Title: Re: spawning paratroopers with a radio call
Post by: sinchi runa on 17 Oct 2007, 19:29:47
 :good:

works like a charm!

paratrooper.sqs

Code: [Select]
chute = createVehicle ["ParachuteWest", position DZ, [], 0, "FLY"];
~0.2
_newGroup = createGroup west;
"SoldierWPilot" createUnit [position chute, _newGroup, "this moveInDriver chute"];

code is for future people looking.

thanks spooner