Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isServer) then {
- private ["_spawnarea","_spawnwest","_spawneast","_grps","_x"];
- _spawnwest = getMarkerPos "Spawn_West";
- _spawneast = getMarkerPos "Spawn_East";
- _spawnarea = toLower (_this select 0); //takes the spawnarea from the trigger
- _grps = floor random (3); //random number for the number of soldiers spawned
- switch (_spawnare) do
- {
- case "west": //Spawn on the West
- {
- deleteGroup GrpInd1_W; //deletes the group if all members of the wave before are death (otherwise does nothing)
- GrpInd1_W= CreateGroup resistance; //creates a new version of the group
- "GUE_Soldier_CO" createunit [_spawnwest, GrpInd1, "nul = ['ftl',this] execVM 'f\common\folk_assignGear.sqf'"];
- for _x from 1 to _grps do { //and from 5 - 15 soldiers
- "GUE_Soldier_1" createunit [_spawnwest, GrpInd1, "nul = ['r',this] execVM 'f\common\folk_assignGear.sqf'"];
- "GUE_Soldier_2" createunit [_spawnwest, GrpInd1, "nul = ['r',this] execVM 'f\common\folk_assignGear.sqf'"];
- "GUE_Soldier_3" createunit [_spawnwest, GrpInd1, "nul = ['rb',this] execVM 'f\common\folk_assignGear.sqf'"];
- "GUE_Soldier_GL" createunit [_spawnwest, GrpInd1, "nul = ['aar',this] execVM 'f\common\folk_assignGear.sqf'"];
- "GUE_Soldier_AR" createunit [_spawnwest, GrpInd1, "nul = ['ar',this] execVM 'f\common\folk_assignGear.sqf'"];
- sleep 1; //sleep for 1s to give the spawned guys a moment to move
- };
- //adds the waypoints for the group
- wp1_w = GrpInd1 addwaypoint [getmarkerpos "West_WP1", 0];
- wp1_w setwaypointspeed "NORMAL";
- wp1_w setwaypointtype "MOVE";
- wp1_w setWaypointFormation "LINE";
- wp1_w setWaypointBehaviour "AWARE";
- wp2_w = GrpInd1 addwaypoint [getmarkerpos "West_WP2", 0];
- wp2_w setwaypointspeed "NORMAL";
- wp2_w setwaypointtype "MOVE";
- wp2_w setWaypointFormation "LINE";
- wp2_w setWaypointBehaviour "AWARE";
- };
- case "east": //Spawn in the East
- {
- deleteGroup GrpInd1_E; //deletes the group if all members of the wave before are death (otherwise does nothing)
- GrpInd1_E= CreateGroup resistance; //creates a new version of the group
- "GUE_Soldier_CO" createunit [_spawneast, GrpInd1, "nul = ['ftl',this] execVM 'f\common\folk_assignGear.sqf'"]; //spawns FTL
- for _x from 1 to _grps do { //and from 5 - 15 soldiers
- "GUE_Soldier_1" createunit [_spawneast, GrpInd1, "nul = ['r',this] execVM 'f\common\folk_assignGear.sqf'"];
- "GUE_Soldier_2" createunit [_spawneast, GrpInd1, "nul = ['r',this] execVM 'f\common\folk_assignGear.sqf'"];
- "GUE_Soldier_3" createunit [_spawneast, GrpInd1, "nul = ['rb',this] execVM 'f\common\folk_assignGear.sqf'"];
- "GUE_Soldier_GL" createunit [_spawneast, GrpInd1, "nul = ['aar',this] execVM 'f\common\folk_assignGear.sqf'"];
- "GUE_Soldier_AR" createunit [_spawneast, GrpInd1, "nul = ['ar',this] execVM 'f\common\folk_assignGear.sqf'"];
- sleep 1; //sleep for 1s to give the spawned guys a moment to move
- };
- //adds the waypoints for the group
- wp1_w = GrpInd1_E addwaypoint [getmarkerpos "East_WP1", 0];
- wp1_w setwaypointspeed "NORMAL";
- wp1_w setwaypointtype "MOVE";
- wp1_w setWaypointFormation "LINE";
- wp1_w setWaypointBehaviour "AWARE";
- wp2_w = GrpInd1_E addwaypoint [getmarkerpos "East_WP2", 0];
- wp2_w setwaypointspeed "NORMAL";
- wp2_w setwaypointtype "MOVE";
- wp2_w setWaypointFormation "LINE";
- wp2_w setWaypointBehaviour "AWARE";
- };
- }
- };
Add Comment
Please, Sign In to add comment