Created
December 24, 2014 22:18
-
-
Save GeorgeDettmer/504a14bfeb0984494c7c 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
waitUntil { | |
_v = _this nearEntities ["Car", 20]; | |
if ({alive _x} count _v > 0) then { | |
_v = _v select 0; | |
_bb = boundingBoxReal _v; | |
_dist = abs ((_bb select 1 select 1) - (_bb select 0 select 1)) - (_this distance _v); | |
if (_this distance _v > _dist +2) exitWith {}; | |
if (speed _v > 2) then {driver _v forceWeaponFire [currentWeapon _v,currentWeapon _v]}; | |
_v setVelocity [0,0,0] | |
}; | |
!alive _this | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment