SHARE
TWEET

oof

FelixCodingYo Jun 18th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*     
  2.     Parameters:
  3.         <-- Phase Number as Integer
  4.        
  5.     Description:
  6.     Modify and add unit spawn template code per phase.
  7.    
  8.     You can also use it to spawn counter attacks, just handle them as a Phase.
  9.     Add further case in the switch-do-loop.
  10.    
  11.     Make Phase Variable an Integer. On trigger Act. use instead of phase = true; phase = phase + 1 or phase = 2.
  12.        
  13.     Example:
  14.         nul = [1] spawn fw_fnc_missionManager;
  15.        
  16. */
  17.  
  18. // Server only execute or HC if present
  19. if (!isServer && hasInterface) exitWith {};
  20. if (HC in allPlayers && isServer) exitWith {};
  21.  
  22. // Parameter init
  23. params ["_nbr"];
  24. _inf = [1,2,3,4,5];
  25. _car = [6,7,8];
  26. _apc = [9];
  27.  
  28. // Phase Case means Phase
  29. switch (_nbr) do {
  30.     // Phase 1
  31.     case 1: {
  32.        
  33.         "Loading Mission" remoteExec ["systemChat", 0];
  34.        
  35.         for "_i" from 1 to 4 do {
  36.             _handle = ["p1_a1","PATROL",selectRandom _inf,["p1_a1","P"]] spawn fw_fnc_spawnTemplate;
  37.             waitUntil {scriptDone _handle};
  38.             sleep 2;
  39.         };
  40.         for "_i" from 1 to 2 do {
  41.             _handle = ["p1_a2","PATROL",selectRandom _inf,["p1_a2","P"]] spawn fw_fnc_spawnTemplate;
  42.             waitUntil {scriptDone _handle};
  43.             sleep 2;
  44.         };
  45.         for "_i" from 1 to 3 do {
  46.             _handle = ["p1_a3","PATROL",selectRandom _inf,["p1_a3","P"]] spawn fw_fnc_spawnTemplate;
  47.             waitUntil {scriptDone _handle};
  48.             sleep 2;
  49.         };
  50.         for "_i" from 1 to 4 do {
  51.             _handle = ["p1_a4","PATROL",selectRandom _inf,["p1_a4","P"]] spawn fw_fnc_spawnTemplate;
  52.             waitUntil {scriptDone _handle};
  53.             sleep 2;
  54.             "Mission Loaded" remoteExec ["systemChat", 0];
  55.             phase = 1;
  56.             publicVariable "phase";
  57.     };
  58.     case 2: {
  59.  
  60.     };
  61.     case 3: {
  62.  
  63.     };
  64. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top