reverse_kappa.sqf 2.2 KB

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