The goal of my trigger is to spawn a group of AI and have them run towards a given point on the map. The trigger and spawn mechanic work fine... Problem is that the trigger activates for EVERY human player and the result is a small army of enemies. I only want it to fire off once for the first guy to hit the trigger and never do so again.
-On the map I have placed the BIS Functions mechanic.
-Created a trigger set to BLUFOR, once and the following "on Act":
: [this] exec "scripts\ai\spawnai.sqs";
And here is the script itself:
if (!isServer) exitWith {};
waituntil {!isnil "bis_fnc_init"};
//create a trigger
//On Act: [this] exec "scripts\ai\spawnai.sqs";
//create groups
_group1 = [getMarkerPos"spwn1", east, ["RU_Soldier_SL","RU_Soldier_SL","RU_Soldier_SL"]] call BIS_fnc_spawnGroup;
_group2 = [getMarkerPos"spwn2", east, ["RU_Soldier_SL","RU_Soldier_SL","RU_Soldier_SL"]] call BIS_fnc_spawnGroup;
_group3 = [getMarkerPos"spwn3", east, ["RU_Soldier_SL","RU_Soldier_SL","RU_Soldier_SL"]] call BIS_fnc_spawnGroup;
//set patrol points
[_group1, getMarkerPos "wp1",75 ] call bis_fnc_taskPatrol;
[_group1, 1] setWaypointSpeed "NORMAL";
[_group2, getMarkerPos "wp2",75 ] call bis_fnc_taskPatrol;
[_group2, 1] setWaypointSpeed "NORMAL";
[_group3, getMarkerPos "wp3",75 ] call bis_fnc_taskPatrol;
[_group3, 1] setWaypointSpeed "NORMAL";
I understand the basic that I need to execute it against the server and not the player and I thought I was doing that with the first line of the script... obviously not. Any input?