Guest User

Untitled

a guest
Apr 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 KB | None | 0 0
  1. if (isServer) then {
  2. private ["_spawnarea","_spawnwest","_spawneast","_grps","_x"];
  3. _spawnwest = getMarkerPos "Spawn_West";
  4. _spawneast = getMarkerPos "Spawn_East";
  5.  
  6. _spawnarea = toLower (_this select 0); //takes the spawnarea from the trigger
  7. _grps = floor random (3); //random number for the number of soldiers spawned
  8.  
  9. switch (_spawnare) do
  10. {
  11. case "west": //Spawn on the West
  12. {
  13. deleteGroup GrpInd1_W; //deletes the group if all members of the wave before are death (otherwise does nothing)
  14. GrpInd1_W= CreateGroup resistance; //creates a new version of the group
  15. "GUE_Soldier_CO" createunit [_spawnwest, GrpInd1, "nul = ['ftl',this] execVM 'f\common\folk_assignGear.sqf'"];
  16. for _x from 1 to _grps do { //and from 5 - 15 soldiers
  17. "GUE_Soldier_1" createunit [_spawnwest, GrpInd1, "nul = ['r',this] execVM 'f\common\folk_assignGear.sqf'"];
  18. "GUE_Soldier_2" createunit [_spawnwest, GrpInd1, "nul = ['r',this] execVM 'f\common\folk_assignGear.sqf'"];
  19. "GUE_Soldier_3" createunit [_spawnwest, GrpInd1, "nul = ['rb',this] execVM 'f\common\folk_assignGear.sqf'"];
  20. "GUE_Soldier_GL" createunit [_spawnwest, GrpInd1, "nul = ['aar',this] execVM 'f\common\folk_assignGear.sqf'"];
  21. "GUE_Soldier_AR" createunit [_spawnwest, GrpInd1, "nul = ['ar',this] execVM 'f\common\folk_assignGear.sqf'"];
  22.  
  23. sleep 1; //sleep for 1s to give the spawned guys a moment to move
  24.  
  25. };
  26. //adds the waypoints for the group
  27. wp1_w = GrpInd1 addwaypoint [getmarkerpos "West_WP1", 0];
  28. wp1_w setwaypointspeed "NORMAL";
  29. wp1_w setwaypointtype "MOVE";
  30. wp1_w setWaypointFormation "LINE";
  31. wp1_w setWaypointBehaviour "AWARE";
  32.  
  33. wp2_w = GrpInd1 addwaypoint [getmarkerpos "West_WP2", 0];
  34. wp2_w setwaypointspeed "NORMAL";
  35. wp2_w setwaypointtype "MOVE";
  36. wp2_w setWaypointFormation "LINE";
  37. wp2_w setWaypointBehaviour "AWARE";
  38.  
  39. };
  40.  
  41.  
  42. case "east": //Spawn in the East
  43. {
  44. deleteGroup GrpInd1_E; //deletes the group if all members of the wave before are death (otherwise does nothing)
  45. GrpInd1_E= CreateGroup resistance; //creates a new version of the group
  46. "GUE_Soldier_CO" createunit [_spawneast, GrpInd1, "nul = ['ftl',this] execVM 'f\common\folk_assignGear.sqf'"]; //spawns FTL
  47. for _x from 1 to _grps do { //and from 5 - 15 soldiers
  48. "GUE_Soldier_1" createunit [_spawneast, GrpInd1, "nul = ['r',this] execVM 'f\common\folk_assignGear.sqf'"];
  49. "GUE_Soldier_2" createunit [_spawneast, GrpInd1, "nul = ['r',this] execVM 'f\common\folk_assignGear.sqf'"];
  50. "GUE_Soldier_3" createunit [_spawneast, GrpInd1, "nul = ['rb',this] execVM 'f\common\folk_assignGear.sqf'"];
  51. "GUE_Soldier_GL" createunit [_spawneast, GrpInd1, "nul = ['aar',this] execVM 'f\common\folk_assignGear.sqf'"];
  52. "GUE_Soldier_AR" createunit [_spawneast, GrpInd1, "nul = ['ar',this] execVM 'f\common\folk_assignGear.sqf'"];
  53.  
  54. sleep 1; //sleep for 1s to give the spawned guys a moment to move
  55. };
  56. //adds the waypoints for the group
  57. wp1_w = GrpInd1_E addwaypoint [getmarkerpos "East_WP1", 0];
  58. wp1_w setwaypointspeed "NORMAL";
  59. wp1_w setwaypointtype "MOVE";
  60. wp1_w setWaypointFormation "LINE";
  61. wp1_w setWaypointBehaviour "AWARE";
  62.  
  63. wp2_w = GrpInd1_E addwaypoint [getmarkerpos "East_WP2", 0];
  64. wp2_w setwaypointspeed "NORMAL";
  65. wp2_w setwaypointtype "MOVE";
  66. wp2_w setWaypointFormation "LINE";
  67. wp2_w setWaypointBehaviour "AWARE";
  68. };
  69. }
  70.  
  71.  
  72.  
  73.  
  74. };
Add Comment
Please, Sign In to add comment