Well, I've been trying to get this to work for 2-3 days.
What I'm trying to do, is have a "mission start" period, where all AI are disabled for 5 minutes, then they are enabled again.
This is my init.sqf:
waitUntil{!(isNil "BIS_fnc_init")};
execVM "briefing.sqf";
execVM "R3F_revive\revive_init.sqf";
execVM "disableAI.sqf";
execVM "weather.sqf"
I have -showscripterrors enabled on ArmA's start parameters, and it says the error file is disableAI.sqf.
DisableAI.sqf:
{
if(side _AI == east) then {
_AI disableAI "MOVE";
_AI disableAI "FSM";
_AI disableAI "TARGET";
_AI disableAI "AUTOTARGET";
_AI disableAI "ANIM";
};
} foreach (allUnits);
hint "MISSION STARTING IN FIVE MINUTES.";
sleep 60;
hint "MISSION STARTING IN FOUR MINUTES.";
sleep 60;
hint "MISSION STARTING IN THREE MINUTES.";
sleep 60;
hint "MISSION STARTING IN TWO MINUTES.";
sleep 60;
hint "MISSION STARTING IN ONE MINUTE.";
sleep 60;
hint "MISSION STARTING!";
sleep 5;
{
if(side _AI2 == east) then {
_AI2 enableAI "MOVE";
_AI2 enableAI "FSM";
_AI2 enableAI "TARGET";
_AI2 enableAI "AUTOTARGET";
_AI2 enableAI "ANIM";
};
} foreach (allUnits);
sleep 15;
hint "";
I tried using an array consisting of CAManBase, Helicopter, and LandVehicle, but it gave me errors. And still is.
Currently, ArmA says the error is an undefined variable in _AI.
What am I doing wrong? I really have no idea why it's not working..
Oh, yeah; I'm also using the ACE addons.