reverseKappa1.sqf 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. comment "Varialbe Decs";
  2. _this setvariable ["Speed",200,true];
  3. _this setvariable ["turnon",true,true];
  4. comment "Increment Speed";
  5. _this addAction ["<t color='#A668C2'>Increment Cap by 10</t>",
  6. {
  7. (_this select 0) setvariable ["Speed",(((_this select 0) getVariable "Speed")+10),true];
  8. hint parseText format["<t color='#A668C2'> Cap set to:%1 Kmph</t>",((_this select 0) getVariable "Speed")];
  9. },[1],0,false,true,"User16"," driver _target == _this"];
  10. comment "Decrement Speed";
  11. _this addAction ["<t color='#FF69B4'>Decrement Cap by 10</t>",
  12. {
  13. (_this select 0) setvariable ["Speed",(((_this select 0) getVariable "Speed")-10),true];
  14. hint parseText format["<t color='#FF69B4'>Cap set to:%1 Kmph</t>",((_this select 0) getVariable "Speed")];
  15. },[1],0,false,true,"User17"," driver _target == _this"];
  16. comment "Engage";
  17. _this addAction ["<t color='#00FF00'>Engage Matter Stopper</t>",
  18. {
  19. (_this select 0) setvariable ["turnon",true,true];
  20. hint parseText "<t color='#00FF00'>ENGAGING C.R.U.I.S.I.E Control System</t>";
  21. while { (alive (_this select 0)) AND (((_this select 0) getvariable "turnon"))} do
  22. {
  23. _Multiplier = 0.4;
  24. _Acceleration = 0.6;
  25. _sleep_time_acceleration_loop = 0.1;
  26. _Max_Multiplier = .1;
  27. _Coef_mul=(-1)*((_Acceleration*_Multiplier/2)*(15*_sleep_time_acceleration_loop));
  28. if ((speed (_this select 0)) > ((_this select 0) getVariable "Speed")) then {
  29. ((_this select 0)) setVelocity
  30. [
  31. (velocity ((_this select 0)) select 0)+((vectordir ((_this select 0))) select 0)*_Coef_mul,
  32. (velocity ((_this select 0)) select 1)+((vectordir ((_this select 0))) select 1)*_Coef_mul,
  33. (velocity ((_this select 0)) select 2)+((vectordir ((_this select 0))) select 2)*_Coef_mul
  34. ]
  35. };
  36. if (_Multiplier < _Max_Multiplier) then {_Multiplier = _Multiplier + 0.1*(15*_sleep_time_acceleration_loop)};
  37. };
  38. turnon=false;
  39. },[1],0,false,true,"User18"," driver _target == _this"];
  40. comment "Disenage";
  41. _this addAction ["<t color='#FFA500'>Disengage Matter Stopper</t>",
  42. {
  43. (_this select 0) setvariable ["turnon",false,true];
  44. hint parseText "<t color='#FFA500'>DISENGAGING</t>";
  45. hint parseText "<t color='#FFA500'>DRIVE DOWN</t>";
  46. },[1],0,false,true,"User19"," driver _target == _this"];