Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
"test bot"
add private _bot_name
this 9 = _bot_name
if !isNil _bot_name
_unit setName _bot_name
_unit = cursorTarget;
_unit setVariable ["bodyName","Mayor George",true];
if (_ammo == "zombie") then {
player setVariable ["udarenZombie", true, true];
diag_log "setVariable udarenZombie true";
};
private ["_udarenZombie"];
_udarenZombie = _victim getVariable["udarenZombie", false];
diag_log "_udarenZombie";
diag_log _udarenZombie;
if (_udarenZombie) then {
_loc_message = format["PLAYERDEADOTZOMBIE: %1 eaten by zombies", _victimName];
_message = format ["%1 eaten by zombies",_victimName];
};
if (((owner _victim) == (owner _killer)) && (!_udarenZombie)) then {
private ["_type","_unit"];
_type = DZAI_BanditTypes call BIS_fnc_selectRandom2; // Select skin of AI unit
_unit = _unitGroup createUnit [_type, _pos, [], 0, "FORM"]; // Spawn the AI unit
_unit setPos _pos;
[_unit] joinSilent _unitGroup; // Add AI unit to group
_unit setVariable ["bodyName",(name _unit)]; // Set unit body name (will be PVed upon death).
_unit setVariable ["unithealth",[(DZAI_baseBlood + (random DZAI_bonusBlood)),0,false]]; // Set unit health (blood, legs health, legs broken)
_unit setVariable ["unconscious",false]; // Set unit consciousness
_unit addEventHandler [DZAI_healthType, DZAI_healthStatements];
0 = [_unit, _weapongrade] call DZAI_setupLoadout; // Assign unit loadout
0 = [_unit, _weapongrade] call DZAI_setSkills; // Set AI skill
if (DZAI_weaponNoise) then {_unit addEventHandler ["Fired", {_this call DZAI_aiFired;}];}; // Unit firing causes zombie aggro in the area, like player.
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: Spawned AI Type %1 with weapongrade %2 for group %3 (fnc_createGroup).",_type,_weapongrade,_unitGroup];};
};