Advertisement
Guest User

Untitled

a guest
Dec 8th, 2015
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. private [];
  2. if !(isNil "EPOCH_simulSwap_Lock") exitWith{ false };
  3.  
  4. if !(isNull EPOCH_Target) exitWith{ false };
  5.  
  6. if (EPOCH_playerEnergy <= 0) exitWith{ _dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Need energy</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; false };
  7.  
  8. _object = _this;
  9.  
  10. EPOCH_buildOption = 2;
  11.  
  12. if (isNull _object) exitWith{ false };
  13. if ((player distance _object) > 9) exitWith { false };
  14.  
  15. if (!(_object isKindOf "ThingX") && !(_object isKindOf "Constructions_static_F") && !(_object isKindOf "Constructions_foundation_F")) exitWith{ false };
  16.  
  17.  
  18. // check if another player has target
  19. _targeter = _object getVariable["last_targeter", objNull];
  20.  
  21. if (!isNull _targeter && _targeter != player && (player distance _object > _targeter distance _object)) exitWith{ EPOCH_stabilityTarget = objNull; false };
  22.  
  23. _stability = _object getVariable["stability", 100];
  24. if (_stability > 0) exitWith{
  25. if (isNull EPOCH_stabilityTarget) then {
  26. _object setVariable["last_targeter", player, true];
  27. EPOCH_stabilityTarget = _object;
  28. };
  29. };
  30.  
  31. /*
  32. if (_object isKindOf "Infostand_base_F") then {
  33. if (!(_object in EPOCH_SURVEY)) then {
  34. EPOCH_SURVEY pushBack _object;
  35. };
  36. };
  37. */
  38.  
  39. // He_Man
  40. _objType = typeOf _object;
  41. if !(_objType call EPOCH_isBuildAllowed) exitWith{true};
  42. // He_Man
  43.  
  44. [_object] spawn EPOCH_simulSwap;
  45.  
  46. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement