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];
};
};
};
Question
matt6950
Can anyone see any obvious reason in the codes below why my AI are no longer spawning.
DZMSAI
WAI:
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now