thrusterengage.sqf 557 B

123456789101112131415161718
  1. _pelican = _this;
  2. _pelican setvariable ["OPTRE_Thruster_EngagedStatus",true,true];
  3. _pelican setobjecttextureglobal [1,"optre_vehicles\pelican\data\bolt_blue_ca.paa"];
  4. hint "ENGAGING FORWARD THRUSTERS";
  5. while {((_pelican getvariable ["OPTRE_Thruster_EngagedStatus",false]) AND (alive _pelican))} do
  6. {
  7. if (speed _pelican <= 600) then {
  8. _vel = velocity _pelican;
  9. _dir = direction _pelican;
  10. _speed = 10;
  11. _pelican setVelocity [
  12. (_vel select 0) + (sin _dir * _speed),
  13. (_vel select 1) + (cos _dir * _speed),
  14. (_vel select 2)
  15. ];
  16. };
  17. sleep 0.5;
  18. };