Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Parameters:
- <-- Phase Number as Integer
- Description:
- Modify and add unit spawn template code per phase.
- You can also use it to spawn counter attacks, just handle them as a Phase.
- Add further case in the switch-do-loop.
- Make Phase Variable an Integer. On trigger Act. use instead of phase = true; phase = phase + 1 or phase = 2.
- Example:
- nul = [1] spawn fw_fnc_missionManager;
- */
- // Server only execute or HC if present
- if (!isServer && hasInterface) exitWith {};
- if (HC in allPlayers && isServer) exitWith {};
- // Parameter init
- params ["_nbr"];
- _inf = [1,2,3,4,5];
- _car = [6,7,8];
- _apc = [9];
- // Phase Case means Phase
- switch (_nbr) do {
- // Phase 1
- case 1: {
- "Loading Mission" remoteExec ["systemChat", 0];
- for "_i" from 1 to 4 do {
- _handle = ["p1_a1","PATROL",selectRandom _inf,["p1_a1","P"]] spawn fw_fnc_spawnTemplate;
- waitUntil {scriptDone _handle};
- sleep 2;
- };
- for "_i" from 1 to 2 do {
- _handle = ["p1_a2","PATROL",selectRandom _inf,["p1_a2","P"]] spawn fw_fnc_spawnTemplate;
- waitUntil {scriptDone _handle};
- sleep 2;
- };
- for "_i" from 1 to 3 do {
- _handle = ["p1_a3","PATROL",selectRandom _inf,["p1_a3","P"]] spawn fw_fnc_spawnTemplate;
- waitUntil {scriptDone _handle};
- sleep 2;
- };
- for "_i" from 1 to 4 do {
- _handle = ["p1_a4","PATROL",selectRandom _inf,["p1_a4","P"]] spawn fw_fnc_spawnTemplate;
- waitUntil {scriptDone _handle};
- sleep 2;
- "Mission Loaded" remoteExec ["systemChat", 0];
- phase = 1;
- publicVariable "phase";
- };
- case 2: {
- };
- case 3: {
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement