boostStop.sqf 441 B

1234567891011121314151617181920
  1. params["_vic","_namMinSpeed","_namDeAccel"];
  2. hint format["DISENGAGING FORWARD THRUSTERS\n\nACTIVATING AIR BRAKES"];
  3. while {(!(_vic getvariable ["OPTRE_Thruster_EngagedStatus",false]) AND (speed _vic > _namMinSpeed))} do
  4. {
  5. _vel = velocity _vic;
  6. _dir = direction _vic;
  7. _speed = _namDeAccel;//-10
  8. _vic setVelocity [
  9. (_vel select 0) + (sin _dir * _speed),
  10. (_vel select 1) + (cos _dir * _speed),
  11. (_vel select 2)
  12. ];
  13. sleep 0.5;
  14. };