initTD.sqf 642 B

1234567891011121314151617181920212223
  1. _vehic = _this;
  2. _vehic setvariable ["impulsorStatus",false,true];
  3. _titlehintimpulsor = "<t color='#E57300' size='2' shadow='1' shadowColor='#000000' align='center'>IMPULSOR</t>";
  4. _texthintimpulsor = "<br /><t color='#CE0000' size='1.4' shadow='1' shadowColor='#000000' align='center'>OFF</t>";
  5. hint parseText (_titlehintimpulsor+_texthintimpulsor);
  6. while {(!(_vehic getvariable ["impulsorStatus",false]) AND (speed _vehic > 100))} do
  7. {
  8. _vel = velocity _vehic;
  9. _dir = direction _vehic;
  10. _speed = -10;
  11. _vehic setVelocity [
  12. (_vel select 0) + (sin _dir * _speed),
  13. (_vel select 1) + (cos _dir * _speed),
  14. (_vel select 2)
  15. ];
  16. sleep 0.5;
  17. };