Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
larcenn

createGroup in multiplayer

Recommended Posts

hi,

I have a problem for create a group in my mission.

The group don't spawn in server

The group spawn in local but i have 1 group for 1 player, 2 groups for 2 players ....

Do you have a solution ?

( sorry for my bad English :P ).

init.sqf :

if (isServer) then {
if (isDedicated) then {
execVM "init_server.sqf";
}else
{
execVM "init_server.sqf";
execVM "init_client.sqf";
};
}else
{
execVM "init_client.sqf";
};

init_server.sqf :

if(!isServer)exitwith{};

vehMission = call compile preprocessFile "fnc\fnc_randomVeh.sqf";
eniMission = call compile preprocessFile "fnc\fnc_randomEni.sqf";
typeMission = call compile preprocessFile "fnc\fnc_randomMission.sqf";
posMission = call compile preprocessFile "fnc\fnc_randomPos.sqf";
publicVariable "posMission";
publicVariable "vehMission";
publicVariable "eniMission";
publicVariable "typeMission";

grp1 = createGroup East;
grp1 = [getMarkerPos _marker, east, (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> eniMission )] call BIS_fnc_spawnGroup;

exemple for my fnc\fnc_xxxx.sqf :

if(!isServer)exitwith{};

private ["_currentEni"]; 

_tabEni = ["OI_reconPatrol","OI_reconSentry","OI_SniperTeam","OIA_InfSentry","OIA_InfSquad"];

_currentEni = (_tabEni call BIS_fnc_selectRandom);
_currentEni

Share this post


Link to post
Share on other sites

You might want to try adding createCenter at top of init.sqf. createCenter is essential for dynamically spawned units.

Share this post


Link to post
Share on other sites

i add :

_SideHQ = createCenter east

in my init, and it's work !!

Thank ;)

Share this post


Link to post
Share on other sites
Sign in to follow this  

×