Jump to content
grandbravo

Technical question: setVariable (client > server > client)

Recommended Posts

Hello everyone,

I got a technical question about the command setVariable and hope someone could help me a bit.

The command setVariable has a third param (public) for namespace, object and group to make the variable public or not. 
Now I would like to understand what this actually means in relation of traffic over the network as I've entered the optimalization phase of my code.
It has to do with code combination of allPlayers and getVariable of each player. If I can undestand the traffic of setVariable with its public param, I might be able to reduce the load somewhere as each FPS in arma is a blessing.

I've thought about the following cases but don't know which one is correct in the case a variable is added (and public) to a client side object:
1) The variable of client will stay client side untill called upon by the server or second client (so: second client request will be sent to the server and the server will request it from the client)
2) The variable of client will be sent to the server and called upon when called by second client (so: client sent and store variable to server. Second client will request from server and server provides the variable)
3) The variable of client will be sent to the server and all clients (so: client sent variable to server, server sent to all players. Variable of the client is allready stored on second clients computer)
4) You are an idiot! Its: ... (none above)

Could one of the BIS Devs (or someone who knows) enlighten me a bit more?

Thank you!

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

×