Robiłem kiedyś coś podobnego i miałem ten sam problem. Rozwiązałem go wprowadzają warunek
@(getPos _heli select 2 < 0.5) czyli desant rozpoczynał się dopiero po tym jak śmigłowiec znalazł się pół metra nad ziemią. Co więcej w czasie desantu cały czas sprawdzana była wysokość tak że nikt nie otrzymywał polecenia "EJECT" jeżeli śmigłowiec się poderwał.
Drugim zabiegiem było danie śmigłowcowi k0omendy
flyInHeight 0 na czas desantu - oczywiście gdy desant wyskoczył komenda była anulowana.
Cały skrypt wyglądał tak:
- Kod: Zaznacz cały
_heli = _this select 0;
_desant = crew _heli - [driver _heli,gunner _heli]
@(getPos _heli select 2 < 0.5)
_heli flyInHeight 0
_i = 0;
#Loop
@(getPos _heli select 2 < 0.5)
_heading = getDir _heli - 45;
_x1 = (getPos _heli select 0) + cos(_heading)*1.5;
_y1 = (getPos _heli select 1) + sin(_heading)*1.5;
_x2 = (getPos _heli select 0) - cos(_heading)*1.5;
_y2 = (getPos _heli select 1) - sin(_heading)*1.5;
_z = (getPos _heli select 2)
?(getPos _heli select 2 > 1):Goto "Loop"
(_desant select _i) action ["EJECT",_heli];
unassignVehicle (_desant select _i)
(_desant select _i) setPos [_x1,_y1,_z];
(_desant select _i) setDir (_heading + 135)
_i = _i + 1;
?(getPos _heli select 2 > 1):Goto "Loop"
(_desant select _i) action ["EJECT",_heli];
unassignVehicle (_desant select _i)
(_desant select _i) setPos [_x2,_y2,_z];
(_desant select _i) setDir (_heading - 45)
_i = _i + 1;
~1
?(_i < count _desant): goto "Loop"
_heli flyInHeight 50
Exit