Jump to content
Sign in to follow this  
alleycat

setvariable locality?

Recommended Posts

I am working on a script that "rigs" several buildings with explosives, using:

_x setVariable ["isRigged",1,false];

All of this happens on the server and there is a random % for every building to be rigged. Now if a client uses actions related to that building, can he access that variable? It works as intended in the editor but on a dedicated server I can not test this for sure because I would need a second player. So can setvariables be accessed by clients when the script that set them is executed on the server alone?

Share this post


Link to post
Share on other sites

From what I know, it should work. To make sure you might want to change the "false" into "true" as that according to the commands page of the wiki broadcasts the variable.

Share this post


Link to post
Share on other sites

The last boolean is whether or not to broadcast the variable (true/false).

Share this post


Link to post
Share on other sites

No. Not if the script only runs on the server. You should set the last argument to true instead.

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  

×