Editors Depot - Mission Editing and Scripting > Arma2 - Editing/Scripting General

Para drop ideas?

(1/1)

Manzilla:
Alright, I'm making a mission in which the enemy ai have a heli come drop off some more troops when I'm detected in the trigger area. I want to have the ai group i've placed in the cargo of the heli insert via para drop when the heli hits a certain waypoint.

I'm trying to get the method I used in ArmA to work but it doesn't seem to work in A2.

I would just put:

--- Quote ---[GrpE2,HeliE2] exec "para.sqs"
--- End quote ---
into the pilot wp I wanted the script to execute and the units I had in the cargo of the heli would jump at that time.

The unit leader of the jumping group had this in the init line:

--- Quote ---grpE1 = group this; {_x moveincargo heliE1} foreach units grpE1; {_x assignascargo heliE1} foreach units grpE1;
--- End quote ---

I also placed this script in my main mission directory:
para.sqs

--- Code: ---_Group = _this select 0
_Vehicle = _this select 1


_listunits = units _Group

_A = 0
_B = count _listunits
#KEEPSENDING
_listunits select _A action ["EJECT", _vehicle]
Unassignvehicle (_listunits select _A)
_A=_A+1
~.5
?_B >_A:goto "KEEPSENDING"
~.5
MoveNext = TRUE
--- End code ---

Does anyone know of a better way to do, and one that works? Having the para drop for this mission is key.

EDIT:

Well my apologies, this method does still work. I had something wrong with the wp setup. But I'm still interested in any other ideas or ways people use for para drops.

hoz:
I do something similar, when the helo gets to it wp, I execute this script. Works well kicks out one unit every .5 seconds, you need to set the helo speed to low...


--- Code: ---if (local server) then {
_grp = _this select 0;
_chop = _this select 1;
{
_x action["eject", _chop];
sleep .5;
unassignvehicle _x;
} foreach units _grp;
};
--- End code ---

Navigation

[0] Message Index

Go to full version