Integrate NS Bloodsuckers

Add and update files for bloodsucker spawning option.
This commit is contained in:
worldwidesorrow
2021-08-18 09:47:25 -05:00
parent c10a436c71
commit 05118343fc
20 changed files with 3335 additions and 225 deletions

View File

@@ -0,0 +1,28 @@
/*
_localtargets and _remotetargets are set in player_zombieCheck.
The bloodsucker will move in the direction of the player assigned as target.
Players with a mutant heart on tool belt will not be targeted.
*/
local _mutant = _this;
if (isNull _mutant) exitWith {objNull}; // Prevent errors if mutant is suddenly deleted
local _localtargets = _mutant getVariable ["localtargets",[]];
local _remotetargets = _mutant getVariable ["remotetargets",[]];
local _targets = _localtargets + _remotetargets;
local _target = objNull;
local _scandist = 200;
{
if !(_x hasWeapon "ItemMutantHeart") then {
local _dist = _x distance _mutant;
if (_dist < _scandist) then {
_target = _x;
_scandist = _dist;
};
};
} count _targets;
_target