//If the killer is a player, lets handle the humanity
if (isPlayer _player) then {
private ["_banditkills","_humanity"];
//diag_log text format ["[DZMS]: Debug: Unit killed by %1 at %2", _player, mapGridPosition _unit];
//Lets grab some info
_humanity = _player getVariable ["humanity",0];
_banditkills = _player getVariable ["banditKills",0];
//If the player gets humanity per config, lets give it
if (DZMSMissHumanity) then {
_player setVariable ["humanity",(_humanity + DZMSCntHumanity),true];
};
//If this counts as a bandit kill, lets give it
if (DZMSCntBanditKls) then {
_player setVariable ["banditKills",(_banditkills + 1),true];
};
//Lets inform the nearby AI of roughly the players position
//This makes the AI turn and react instead of laying around
{
if (((position _x) distance (position _unit)) <= 300) then {
_x reveal [_player, 4.0];
}
} forEach allUnits;
wondering how to add this to dzai its from a good mission system
These features are already in DZAI. The humanity is configured as already stated and finding the killer of an AI is enabled by default (DZAI_findKiller option).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.