Advertisement
Guest User

Tavi 2.0 - Maule Init

a guest
Sep 18th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. kh_mauleOffset = [0, 3, 0];
  2.  
  3. kh_checkMaule =
  4. {
  5. private ["_vehicle", "_menNearProp"];
  6.  
  7. _vehicle = _this;
  8.  
  9. if (isEngineOn _vehicle) then
  10. {
  11. _menNearProp = (_vehicle modelToWorld kh_mauleOffset) nearObjects ["Man", 2.8];
  12.  
  13. {
  14. // Now that setDamage only happens on the local machine (to avoid
  15. // upsetting BattlEye), only call the prophit once since otherwise
  16. // "alive" will be true for the victim for many iterations and the
  17. // sound and other effects will be repeated.
  18.  
  19. if (isNil { _x getVariable "kh_hitByMaule" }) then
  20. {
  21. _x setVariable ["kh_hitByMaule", true];
  22.  
  23. private "_spawned";
  24.  
  25. _spawned = [_x, _vehicle] execVM "\khr\maule\scripts\maule_prophit.sqf";
  26. };
  27. } forEach _menNearProp;
  28. };
  29. };
  30.  
  31. if (!isDedicated) then
  32. {
  33. [] execVM "fixes\maule\scripts\maule_prophit_monitor.sqf";
  34. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement