Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- filename: @fn_spawnWave.sqf
- Author: J. Schmidt
- Coded for SOG Missions and Campaigns
- */
- params ["_spawn", "_attack", "_waves", "_side", "_cfgSide", "_cfgFaction", "_cfgUnitType", ["_units", []]];
- SpawnEnemies = true;
- _wave = 0;
- while {SpawnEnemies} do {
- _rdmSquad = _units call BIS_fnc_selectRandom;
- // (configFile >> "CfgPatches" >> "CfgSide" >> "CfgFaction" >> "CfgUnitType" >> "CfgUnitClassName" or "CfgGroupClassName" or "CfgVehicleClassName")
- _grp = [getMarkerPos _spawn, _side, (configFile >> "CfgGroups" >> _cfgSide >> _cfgFaction >> _cfgUnitType >> _rdmSquad)] call BIS_fnc_spawnGroup;
- null = [_grp, (getMarkerPos _attack)] call BIS_fnc_taskAttack;
- waitUntil {{alive _x} count (units _grp) == 0};
- _wave = _wave + 1;
- if (_wave < _waves) then { SpawnEnemies = true } else { SpawnEnemies = false };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement