kibaBG 53 Posted February 18, 2023 I cannot make stalking group to work on dedicated. Any help is appreciated. private _headlessClients = entities "HeadlessClient_F"; private _humanPlayers = playableUnits - _headlessClients; while {true} do { _rNumber = selectRandom [1,2,3]; if (_rNumber == 1) then { _stGrpPos = [(getPos (playableUnits select 0)), 500, 800, 0, 0, 0, 0] call BIS_fnc_findSafePos; _stGrp = [_stGrpPos, east, ["cfp_o_is_squad_leader","cfp_o_is_at","cfp_o_is_at","cfp_o_is_autorifleman"]] call BIS_fnc_spawnGroup; _stGrp deleteGroupWhenEmpty true; _stalking = [_stGrp, group (playableUnits select 0)] spawn BIS_fnc_stalk; } else { if (_rNumber == 2) then { _stGrpPos = [(getPos (playableUnits select 0)), 500, 800, 0, 0, 0, 0] call BIS_fnc_findSafePos; _stGrp = [_stGrpPos, east, ["CFP_O_IS_Hilux_ZU_23_01","cfp_o_is_rifleman","cfp_o_is_at"]] call BIS_fnc_spawnGroup; _stGrp deleteGroupWhenEmpty true; _stalking = [_stGrp, group (allPlayers select 0)] spawn BIS_fnc_stalk; } else { _stGrpPos = [(getPos (playableUnits select 0)), 500, 800, 0, 0, 0, 0] call BIS_fnc_findSafePos; _stGrp = [_stGrpPos, east, ["CFP_O_IS_Hilux_AGS_30_01","cfp_o_is_rifleman","cfp_o_is_at"]] call BIS_fnc_spawnGroup; _stGrp deleteGroupWhenEmpty true; _stalking = [_stGrp, group (playableUnits select 0)] spawn BIS_fnc_stalk; };}; sleep 900; }; Executed from initServer.sqf UPDATE: The code seems to work on dedicated. ☺️ Is there another way to refer to the player on dedicated, apart from playableUnits select 0 ? Share this post Link to post Share on other sites
pierremgi 4890 Posted February 19, 2023 waitUntil {allPlayers isNotEqualTo []}; .... (selectRandom allPlayers) 1 Share this post Link to post Share on other sites