@SpyderBlack723 HC'S can be run freely alongside your game instance using multiple instances of the same copy of the game.
That's awesome. I recall requiring more than one copy of the game for HCs, but maybe that's just for Arma 2.
I've managed to come up with a simple loop to offload server-owned AI onto player units in the meantime, but now I'm running into a much bigger problem:
CQB doesn't seem to have a group limiter, meaning potentially hundreds of AI can spawn. Even offloading that many AI onto tons of other players/HCs won't help if I can't limit the amount of AI spawned by a singular CQB.
Is there a way to do this other than setting the spawns to solo, and having their spawn distance be ridiculously low?
I managed to go from 60% server CPU usage with only 40 AI - to 330 units at ~48% average CPU usage for server, by running this loop on the server:
while {true} do {
{
EZLeader = leader _x;
EZGroup = group EZLeader;
if((groupOwner EZGroup) <= 2) then {
LeaderToCheck = EZLeader;
ClosestPlayer = objNull;
DistanceToCheck = 10000;
{
DistanceBetween = _x distance LeaderToCheck;
if((isPlayer _x) && (DistanceBetween < DistanceToCheck)) then
{
ClosestPlayer = _x;
DistanceToCheck = DistanceBetween;
};
} forEach playableUnits;
NewOwnerID = owner ClosestPlayer;
EZGroup setGroupOwner NewOwnerID;
EZGroup enableDynamicSimulation true;
"[DEBUG] Group is now owned by Player 1." remoteExec ["systemChat", 0, false];
};
} forEach allGroups;
sleep 1;
};