Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. boltTarget = cursorTarget;
  2.  
  3. targetPos = position cursorTarget;
  4.  
  5.  
  6.  
  7.  
  8.  
  9. BUCK_fnc_boltGun =
  10.  
  11. {
  12.  
  13. private ["_boltTarget", "_targetPos"];
  14.  
  15. _boltTarget = _this select 0;
  16.  
  17. _targetPos = _this select 1;
  18.  
  19.  
  20.  
  21. _bolt = createVehicle ["LightningBolt", [_targetPos select 0, _targetPos select 1, _targetPos select 2], [], 0, "CAN_COLLIDE"];
  22.  
  23. _boltVis = createVehicle ["Lightning1_F", [_targetPos select 0, _targetPos select 1, _targetPos select 2], [], 0, "CAN_COLLIDE"];
  24.  
  25. _bolt setDamage 1;
  26.  
  27. sleep 0.5;
  28.  
  29. deleteVehicle _boltVis;
  30.  
  31. sleep 0.5;
  32.  
  33. deleteVehicle _bolt;
  34.  
  35. };
  36.  
  37.  
  38.  
  39. boltGun = player addEventHandler ["Fired",
  40.  
  41. {
  42.  
  43. boltTarget = cursorTarget;
  44.  
  45. if (isNull boltTarget) then
  46.  
  47. {targetPos = screenToWorld [0.5,0.5]}
  48.  
  49. else
  50.  
  51. {targetPos = position cursorTarget};
  52.  
  53.  
  54.  
  55. NULL = [boltTarget, targetPos] spawn BUCK_fnc_boltGun;
  56.  
  57. player sideChat format ["Cursor Target + %1", boltTarget];
  58.  
  59. }];
  60.  
  61.  
  62.  
  63. stopAc = player addAction ["Remove Zeus Mode", {player removeEventHandler ["Fired", boltGun]; player removeAction stopAc}];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement