Jump to content
Sign in to follow this  
samatra

publicVariableServer? Was it removed?

Recommended Posts

Hello. I stumbled upon several announcements about publicVariableServer command which syncs variable only with server which will be extremely useful for my mission. I've tried it and it looks like command doesn't exists in last beta build, was it revoked or I'm doing something wrong? There is also barely any mention about this command apart from dayz change logs copy-pasted all over the internet. I will really appreciate if somebody could explain what is going on. Thank you.

Share this post


Link to post
Share on other sites

This thread needs a bump. I will really appreciate an answer. Thank you.

Share this post


Link to post
Share on other sites

I'm not sure about this command, I have never use it, but you don't need it. You can do the exact same thing with setVariable.

_missionNameSpace setVariable ["myVariable", 123]; // server

_myotherobject setVariable ["myVariable", 123]; // player or object.

That will do the exact same thing,

Share this post


Link to post
Share on other sites

Not correct Riouken, 2 very different commands and usability.

While setvariable only stores a value within an object namespace, the publicvariable commands broadcast a value from a machine to others within the network.

The new publicvariables actually go a little further and let you broadcast a value to a single machine, be it the server or a client, this ofc, helps a lot with the network traffic, making it more efficient.

In relation to the OP, I'm not sure what you may be doing wrong, maybe posting the code could help.

Share this post


Link to post
Share on other sites

I know neo, But what I am saying is you can achieve the same effect by running setVariable commands locally using either cba events or MP framework. If he can not use publicVariableServer due to beta issues or it not working correctly, then it can be done other ways. Like I said.

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
Sign in to follow this  

×