// Lets hope this helps with the AI's view of object locality
/* waituntil {(!isNil "PublicServerIsLoaded")};
waituntil {(PublicServerIsLoaded)}; */
if (SAR_dynamic_spawning) then {
_worldname = toLower worldName;
if (!(_worldname in SAR_Maps)) exitWith {diag_log format ["Sarge's AI System: %1 does not currently support dynamic AI spawning! Dynamic AI spawning has been disabled!",_worldName];};
diag_log format ["Sarge's AI System: Now generating dynamic map grid for %1.",_worldname];
call compile format ["SAR_trig_%1_%2 = _this",_ii,_i];
_trig_act_stmnt = format["if (SAR_DEBUG) then {diag_log 'SAR DEBUG: trigger on in %1';};[thislist,'%1'] spawn SAR_fnc_AI_spawn;",_triggername];
_trig_deact_stmnt = format["if (SAR_DEBUG) then {diag_log 'SAR DEBUG: trigger off in %1';};[thislist,thisTrigger,'%1'] spawn SAR_fnc_AI_despawn;",_triggername];
_trig_cond = "{isPlayer _x} count thisList > 0;";
call compile format ["SAR_trig_%1_%2 ",_ii,_i] setTriggerStatements [_trig_cond,_trig_act_stmnt , _trig_deact_stmnt];
// standard grid definition - maxgroups (ba,so,su) - probability (ba,so,su) - max group members (ba,so,su)
diag_log format["Sarge's AI System: Dynamic spawn definitions have been configured for %1.",worldName];
};
if (SAR_useBlacklist) then {
switch (_worldname) do {
case "namalsk": {SAR_Blacklist = ["TraderZoneSebjan","NorthernBoatTrader","SouthernBoatTrader"];diag_log format ["Sarge's AI System: Blacklisted zones are %1",SAR_Blacklist];};
case "altis": {SAR_Blacklist = ["MafiaTraderCity","TraderZoneSilderas","TraderZoneFolia"];diag_log format ["Sarge's AI System: Blacklisted zones are %1",SAR_Blacklist];};
case "tanoa": {SAR_Blacklist = ["ExileMarker1","ExileMarker13","ExileMarker15","ExileMarker35","ExileMarker51"];diag_log format ["Sarge's AI System: Blacklisted zones are %1",SAR_Blacklist];};
default {SAR_Blacklist = [];diag_log format ["Sarge's AI System: Blacklisted zones are not currently supported for %1!",worldName];};