UserVariable

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Post Reply
chinaWD
Posts: 1
Joined: 17 Jul 2014, 03:53

UserVariable

Post by chinaWD »

hello.
I was in there was a problem when using the UserVariable.
The two users to join the same room. For example, user ' A', 'B'
'A' join room Wait 'B' join room.
'A' not response 'B' send Update UserVariable event
please Someone met?


Thanks !!!
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: UserVariable

Post by Lapo »

Hi,
unfortunately your question is not very clear to me.

I'll try to reply for what I understand. If the two users (A, B) are in the same Room they will receive the USER_VARIABLES_UPDATE event each time one of them sets a UserVariable.

If they are not in the same Room, this won't happen.

Suppose you have this scenario:

User A is joined in "Yellow Room"
User B is not joined anywhere.

User B sets a new Variable, Score = 100
User A won't receive any event because they're not in the same Room.

User B joins the "Yellow Room"
Now User A sees User B can can access his variables, so it will be possible to access the User B's variable from User A.

For more details:
http://docs2x.smartfoxserver.com/Develo ... -variables

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply