thrusterdisengage.sqf 507 B

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