Forum Jump :

Author Message


call me evil

Posts: 1969

Country: de
Occupation: CWR III Project Leader
Age: 104
In-game name:

#98686 Posted at 2011-02-19 21:23        
In this case, things are even easier:

Give the boat a transport unload waypoint (yeah i know...), and one far away. Give the boat a name (boat1)
Give your Seal team a group name: In the init line of the leader type
seals=group this; {_x moveInCargo boat1} forEach units seals;
Also give each of your Seals a name (s1 - s4).

Next add a trigger:
Size 0
Activation: None
Condition: !(s1 in boat1) <- s1 (leader seals) is no more in the boat1
OnActivation: nul=[seals,boat1] execVM "unload.sqf";

unload.sqf script:
_grp = _this select 0;
_vehicle = _this select 1;
_aunits = units _grp;
_i = 0;
_j = count _aunits;

waitUntil {(speed _vehicle < 4)};
while {_j>_i} do
  driver _vehicle disableAI "MOVE";
  (_aunits select _i) action ["getOut",_vehicle];
  unassignVehicle (_aunits select _i);
  sleep 0.8;

sleep 2;
driver _vehicle enableAI "MOVE";

At the transport unload WP only you the player (name s1) is unloaded but as soon as you are out of the boat, the script starts and disables the boat drivers move ability. Then it ejects every 0.8 secs one of the other members of your group. 2 seconds after all are out, the driver gets his move ability back and moves to his final destination.

This post was edited by W0lle (2011-02-19 22:08, ago)