Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Possible Loss
- * by Tommy
- * Defend to survive!
- */
- _spawnMarker1 = getMarkerPos "spawn1"; // Above
- _spawnMarker4 = getMarkerPos "spawn4"; // Below
- _wayMarker = getMarkerPos "way1"; // Centered (air field)
- _unitName = "Mi17_TK_EP1";
- _pilotName = "TK_Soldier_Pilot_EP1";
- _heliSpawnCount = 0;
- _grp1 = createGroup EAST;
- _grp4 = createGroup EAST;
- _ammoMag = "2000Rnd_23mm_AZP85";
- _cleanArray = [];
- while {true} do
- {
- // Increment the counter
- _heliSpawnCount = _heliSpawnCount + 1;
- // Create the first helicopter for the first group
- _heli1 = createVehicle[_unitName, _spawnMarker1, [], 0, "FLY"];
- // Etc..
- _heli4 = createVehicle[_unitName, _spawnMarker4, [], 0, "FLY"];
- _cleanArray = _cleanArray + [_heli1, _heli4];
- _pilotName createUnit [getPos _heli1, _grp1];
- _pilotName createUnit [getPos _heli4, _grp4];
- {
- _x moveInDriver _heli1;
- _heli1 doMove(_wayMarker);
- } foreach units _grp1;
- {
- _x moveInDriver _heli4;
- _heli4 doMove(_wayMarker);
- } foreach units _grp4;
- switch (_heliSpawnCount) do
- {
- case 30:
- {
- hint "Lagging yet? Clean up time!";
- {
- deleteVehicle _x;
- } foreach _cleanArray;
- _heliSpawnCount = 0;
- };
- };
- // Check ammo, need lots!
- if (vehicle player != player) then
- {
- _ammoCount = player ammo _ammoMag;
- if (_ammoCount < 500) then
- {
- vehicle player addMagazineTurret[_ammoMag, [0]];
- };
- };
- // Need to pause spawning so they can get moving without crashing
- sleep 15;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement