Jump to content
chris4thewin

Arma 3 zeus editable objects

Recommended Posts

hey, so I'm running into an issue where players that are on my server are not editable by Zeus. I put the add editable object module down with the following code 
 

Quote

if (isServer) then { 
 { 
  _x addCuratorEditableObjects [allUnits,true]; 
  _x addCuratorEditableObjects [vehicles,true]; 
 } forEach allCurators;             
}; 

The problem I'm having is the players are not showing up after they respawn

Any thoughts?

 

Share this post


Link to post
Share on other sites

Your code is only running once, when the server initializes. You need to add a loop, something along the lines of:

0 =[] spawn {
    while {true} do {
        if (isServer) then { 
            { 
                _x addCuratorEditableObjects [allUnits,true]; 
                _x addCuratorEditableObjects [vehicles,true]; 
            } forEach allCurators;             
        }; 
        sleep 30;
    };
};

 

Share this post


Link to post
Share on other sites
14 hours ago, Harzach said:

You need to add a loop, something along the lines of

That is not a loop.

put a while {true} do {...}
around the if/then/sleep inside the spawn

  • Like 1

Share this post


Link to post
Share on other sites
45 minutes ago, Dedmen said:

That is not a loop.

 

Yes, of course, I have not been getting much sleep. Thanks!

Any reason placing the while loop after the server check is a bad idea?

0 =[] spawn {
    if (isServer) then { 
	    while {true} do {
            { 
                _x addCuratorEditableObjects [allUnits,true]; 
                _x addCuratorEditableObjects [vehicles,true]; 
            } forEach allCurators;   
            sleep 30;
        }; 
    };
};


 

Share this post


Link to post
Share on other sites
15 hours ago, Harzach said:

Any reason placing the while loop after the server check is a bad idea? 

No thats a good idea.

keep in mind though that always sending ALL units and ALL vehicles can cause quite a big amount of network traffic, which can also cause stuttering on clientside.

I would suggest to only add missing objects
 

_x addCuratorEditableObjects [allUnits - curatorEditableObjects _x,true];
_x addCuratorEditableObjects [vehicles - curatorEditableObjects _x,true];

Will take a bit more load on the server because of the filtering, but will greatly reduce network and clientside load.

And you generally don't care about microstutter on server, but you certainly do on client.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×