Can anyone see any obvious reason in the codes below why my AI are no longer spawning.
DZMSAI
//Add the behaviour _unit enableAI "TARGET"; _unit enableAI "AUTOTARGET"; _unit enableAI "MOVE"; _unit enableAI "ANIM"; _unit enableAI "FSM"; _unit setCombatMode "YELLOW"; _unit setBehaviour "COMBAT"; //Zupa Currency _cash = round(random 10) * 100; // number between 0 and 1000 _unit setVariable["headShots",_cash,true];
WAI:
ai_special_humanity = 150; // amount of humanity gain or loss for killing a special AI dependant on player alignment ai_coin_award = true; ai_hero_amount = 20; ai_bandit_amount = 20; ai_special_amount = 30;
if (isPlayer _player) then { private ["_banditkills","_humanity","_humankills"]; _humanity = _player getVariable["humanity",0]; _banditkills = _player getVariable["banditKills",0]; _humankills = _player getVariable["humanKills",0]; _playerCoins = _player getVariable["cashMoney",0]; _unitCoins = _unit getVariable["cashMoney",0]; if (ai_humanity_gain) then { _gain = _unit getVariable ["humanity", 0]; call { if (_unit getVariable ["Hero", false]) exitWith { _player setVariable ["humanity",(_humanity - _gain),true]; }; if (_unit getVariable ["Bandit", false]) exitWith { _player setVariable ["humanity",(_humanity + _gain),true]; }; if (_unit getVariable ["Special", false]) exitWith { if (_humanity < 0) then { _player setVariable ["humanity",(_humanity - _gain),true]; } else { _player setVariable ["humanity",(_humanity + _gain),true]; }; }; if (ai_coin_award) then { _player setVariable ["cashMoney",(_playerCoins + _unitCoins),true]; }; }; };
call { if(_aitype == "hero") exitWith { _unit setVariable ["Hero",true]; _unit setVariable ["humanity", ai_remove_humanity]; _unit setVariable ["cashMoney", ai_hero_amount]; }; if(_aitype == "bandit") exitWith { _unit setVariable ["Bandit",true]; _unit setVariable ["humanity", ai_add_humanity]; _unit setVariable ["cashMoney", ai_bandit_amount]; }; if(_aitype == "special") exitWith { _unit setVariable ["Special",true]; _unit setVariable ["humanity", ai_special_humanity]; _unit setVariable ["cashMoney", ai_special_amount]; }; };