Created
December 24, 2014 22:15
-
-
Save GeorgeDettmer/65cbb9ffb5d58bcffebe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeName _this == "OBJECT") then {_this = [_this]}; | |
if (isNil 'MOSES__BOOMER_TYPES') then {MOSES__BOOMER_TYPES = []}; | |
{ | |
0 = _x addEventHandler ["killed", { | |
(createVehicle ["R_TBG32V_F",position (_this select 0),[],0,"CAN_COLLIDE"]) setDamage 1; | |
}]; | |
_x setVariable ["boomer",true,true]; | |
if !(typeOf _x in MOSES__BOOMER_TYPES) then {0 = MOSES__BOOMER_TYPES pushBack typeOf _x}; | |
} count _this; | |
if (isNil 'MOSES__BOOMER_LOOP') then { | |
if (isNil 'MOSES__BOOMER_DIST') then {MOSES__BOOMER_DIST=5}; | |
MOSES__BOOMER_LOOP = 0 spawn { | |
waitUntil { | |
{ | |
if (_x getVariable ["boomer",false]) then { | |
_x setDamage 1 | |
}; | |
} count (nearestObjects [vehicle player,MOSES__BOOMER_TYPES,MOSES__BOOMER_DIST]); | |
uiSleep 0.1; | |
!alive player | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment