diff --git a/helotraining_mp.Altis/createEnemySquads.sqf b/helotraining_mp.Altis/createEnemySquads.sqf index ef76582..0d04aca 100644 --- a/helotraining_mp.Altis/createEnemySquads.sqf +++ b/helotraining_mp.Altis/createEnemySquads.sqf @@ -9,6 +9,7 @@ _centreCoords set [1, ((_centreCoords select 1) + 100 + (floor random 300))]; private _enemyPosition = _centreCoords findEmptyPosition [0,100]; +// TODO: use some preconfigured fireteam setup private _groupEnemy = createGroup east; "O_Soldier_F" createUnit [_enemyPosition, _groupEnemy,"",0.6, "CORPORAL"]; "O_Soldier_F" createUnit [_enemyPosition, _groupEnemy,"",0.1, "PRIVATE"]; diff --git a/helotraining_mp.Altis/createSquad.sqf b/helotraining_mp.Altis/createSquad.sqf index e0c2128..4ce54dc 100644 --- a/helotraining_mp.Altis/createSquad.sqf +++ b/helotraining_mp.Altis/createSquad.sqf @@ -1,6 +1,7 @@ //diag_log format["createSquad called, _this: %1", _this]; private _spawnPos = _this select 0; +// TODO: use some preconfigured fireteam setup private _groupTaxi = createGroup west; "B_Soldier_F" createUnit [_spawnPos, _groupTaxi,"",0.6, "CORPORAL"]; "B_soldier_AR_F" createUnit [_spawnPos, _groupTaxi,"",0.3, "PRIVATE"]; diff --git a/helotraining_mp.Altis/description.ext b/helotraining_mp.Altis/description.ext index a23162a..130c812 100644 --- a/helotraining_mp.Altis/description.ext +++ b/helotraining_mp.Altis/description.ext @@ -29,10 +29,10 @@ class Params class LZSize { //paramsArray[1] - title = "LZ Size"; - values[] = {100,200,300,400,500,600,700,800,900,1000}; - texts[] = {"100m","200m","300m","400m","500m","600m","700m","800m","900m","1000m"}; - default = 300; + title = "LZ Size (land within X meters of center)"; + values[] = {15, 25, 50, 100, 150, 200,300,400,500,600,700,800,900,1000}; + texts[] = {"15m", "25m", "50m", "100m", "150m", "200m","300m","400m","500m","600m","700m","800m","900m","1000m"}; + default = 100; }; class SmokeSetting diff --git a/helotraining_mp.Altis/getAlivePlayers.sqf b/helotraining_mp.Altis/getAlivePlayers.sqf new file mode 100644 index 0000000..d2ec69f --- /dev/null +++ b/helotraining_mp.Altis/getAlivePlayers.sqf @@ -0,0 +1,11 @@ +private _returnValue = []; + +private _justPlayers = (call BIS_fnc_listPlayers) - entities "HeadlessClient_F"; +{ + if (alive _x) then + { + [_returnValue, _x] call BIS_fnc_arrayPush; + }; +} forEach _justPlayers; + +_returnValue \ No newline at end of file diff --git a/helotraining_mp.Altis/getSideActiveTasks.sqf b/helotraining_mp.Altis/getSideActiveTasks.sqf index eacdb2d..0a2cb5e 100644 --- a/helotraining_mp.Altis/getSideActiveTasks.sqf +++ b/helotraining_mp.Altis/getSideActiveTasks.sqf @@ -5,7 +5,7 @@ private _returnValue = []; { if (!(_x call BIS_fnc_taskCompleted)) then { - _returnValue = _returnValue + [_x]; + [_returnValue, _x] call BIS_fnc_arrayPush; }; } forEach ([_side] call getSideTasks); diff --git a/helotraining_mp.Altis/playerVehicleInList.sqf b/helotraining_mp.Altis/playerVehicleInList.sqf index 8298bce..48ef755 100644 --- a/helotraining_mp.Altis/playerVehicleInList.sqf +++ b/helotraining_mp.Altis/playerVehicleInList.sqf @@ -1,8 +1,8 @@ +// TODO: Rename this function, since it checks for the landing status too //diag_log format["playerVehicleInList called, _this: %1", _this]; private _triggerList = _this select 0; private _returnValue = false; -private _justPlayers = (call BIS_fnc_listPlayers) - entities "HeadlessClient_F"; scopeName "main"; { private _plr = _x; @@ -12,7 +12,7 @@ scopeName "main"; _returnValue = _veh; breakTo "main"; } -} forEach _justPlayers; +} forEach ([] call getAlivePlayers); //diag_log format["playerVehicleInList returning: %1", _returnValue]; _returnValue \ No newline at end of file diff --git a/helotraining_mp.Altis/precompile.sqf b/helotraining_mp.Altis/precompile.sqf index 6a804f9..666401b 100644 --- a/helotraining_mp.Altis/precompile.sqf +++ b/helotraining_mp.Altis/precompile.sqf @@ -15,6 +15,7 @@ getSideTasks = compileFinal preProcessfile "getSideTasks.sqf"; getSideActiveTasks = compileFinal preProcessfile "getSideActiveTasks.sqf"; isLanded = compileFinal preProcessfile "isLanded.sqf"; selectLZ = compileFinal preProcessfile "selectLZ.sqf"; +getAlivePlayers = compileFinal preProcessfile "getAlivePlayers.sqf"; taskSpawner = compileFinal preProcessfile "taskSpawner.sqf"; xenoRepair = compileFinal preProcessfile "xenoRepair.sqf"; diff --git a/helotraining_mp.Altis/readparams.sqf b/helotraining_mp.Altis/readparams.sqf index 19b46ec..bf545e9 100644 --- a/helotraining_mp.Altis/readparams.sqf +++ b/helotraining_mp.Altis/readparams.sqf @@ -32,7 +32,6 @@ lzList = []; _x = 0; while {_x < LZCOUNT} do { - _lz = missionNamespace getVariable ("lz" + format["%1", _x + 1]); - lzList = lzList + [_lz]; + [lzList, (missionNamespace getVariable (format["lz%1", _x + 1]))] call BIS_fnc_arrayPush; _x = _x + 1; }; diff --git a/helotraining_mp.Altis/selectLZ.sqf b/helotraining_mp.Altis/selectLZ.sqf index 11049a0..8322054 100644 --- a/helotraining_mp.Altis/selectLZ.sqf +++ b/helotraining_mp.Altis/selectLZ.sqf @@ -9,7 +9,7 @@ if (!(_excludeList isEqualTo false)) then }; private _taskLocations = []; { - _taskLocations = _taskLocations + [([_x] call BIS_fnc_taskDestination)]; + [_taskLocations, ([_x] call BIS_fnc_taskDestination)] call BIS_fnc_arrayPush; } forEach ([west] call getSideActiveTasks); scopeName "main"; diff --git a/helotraining_mp.Altis/taskSpawner.sqf b/helotraining_mp.Altis/taskSpawner.sqf index 2dd2bf4..6eb9e86 100644 --- a/helotraining_mp.Altis/taskSpawner.sqf +++ b/helotraining_mp.Altis/taskSpawner.sqf @@ -8,19 +8,11 @@ scopeName "main"; while {true} do { scopeName "mainloop"; - private _justPlayers = (call BIS_fnc_listPlayers) - entities "HeadlessClient_F"; - private _alivePlayers = []; - { - if (alive _x) then - { - _alivePlayers = _alivePlayers + [_x]; - }; - } forEach _justPlayers; + private _alivePlayers = [] call getAlivePlayers; while {count ([west] call getSideActiveTasks) < count _alivePlayers} do { scopename "spawnloop"; diag_log format["taskSpawner: active tasks: %1 players: %2", (count ([west] call getSideActiveTasks)), (count _alivePlayers)]; - // TODO: Filter the list so that locations near currently active tasks are not considered private _newLZLocation = [_lzexclude] call selectLZ; private _plrAssigned = false; if (_tryAssignPlr) then