Page 1 of 1

Update Value VariableRoom

Posted: 20 Dec 2017, 16:32
by mers
Hello everybody,

I have a small problem on _room.GetVariable ("update_me_plz"). Value ("im_the_value") client-side
I update my RoomVariable on server-side ( to "im_the_NEW_value" ), and on smartfox i can see the variable being updated.. all is fine.

But now client-side back I restart the script _room.GetVariable ("update_me_plz") Value and is always the original value ("im_the_value")

Any idea ? thx to all and sorry for bad eng

Re: Update Value VariableRoom

Posted: 21 Dec 2017, 08:38
by Lapo
Hi,
you need to listen for the USER_VARIABLES_UPDATE event. When it fires on the client side the variable is accessible with the new value.

Hope it helps

Re: Update Value VariableRoom

Posted: 21 Dec 2017, 14:56
by mers
Hi and thx for info,
Actually i change variable on client-side directly and this work fine.