DisabledSysEvents

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

wallis2xk
Posts: 43
Joined: 01 Sep 2006, 10:00
Location: United Kingdom

DisabledSysEvents

Postby wallis2xk » 06 Sep 2006, 09:52

Hi,

Dunno if this is my fault, but I've included this in my zone

Code: Select all

<DisabledSysEvents>
     <event>onUserVariablesUpdate</event>
     <event>onUserEnterRoom</event>
     <event>onUserLeaveRoom</event>
</DisabledSysEvents>


onUserEnterRoom and onUserLeaveRoom are now not being called, but onUserVariablesUpdate still is, albeit with an undefined User object. Am I doing this wrong?

Cheers

Dave
wallis2xk
Posts: 43
Joined: 01 Sep 2006, 10:00
Location: United Kingdom

Disabling onRoomAdd

Postby wallis2xk » 06 Sep 2006, 13:46

On a similar topic, (which could be related to another thread I saw below) I've also come across a problem with onRoomAdded - that if I disable this event my client side createRoom triggers a onJoinRoom with the roomObj parameter undefined. When I enable it, the roomObj works as normal.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 06 Sep 2006, 13:54

onUserEnterRoom and onUserLeaveRoom are now not being called, but onUserVariablesUpdate still is, albeit with an undefined User object. Am I doing this wrong?


shutting down those two events will prevent your local view of the users in the room from updating. Just wanted to point it out. If this is waht you need, then no problem :)

About the onUserVariablesUpdate and onRoomVariablesUpdate: they are not supported in the list of possible events that you can shut down.
The reason is very simple, if you don't want those events you don't use the Room Variables or User Variables :D

In other words, you can suppress events that the server sends automatically to the clients during it's activity. Those variable events are only fired if it's the client itself the send those requests... so you just have to avoid using them.
Please note that when you suppress these events, all the rooms within the Zone will stop receiving them.

hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
wallis2xk
Posts: 43
Joined: 01 Sep 2006, 10:00
Location: United Kingdom

Postby wallis2xk » 06 Sep 2006, 14:34

shutting down those two events will prevent your local view of the users in the room from updating. Just wanted to point it out. If this is waht you need, then no problem


Yep, that's what I want. (I think :P) I'm using the userJoin, userExit interval events on the server side to handle these.

For the user variables: if you remember from my other post, I need all my users to be in the same zone and they will all exist in at least 1 room (the global chat one). Then, when they join a separate game room, I need some game variables to be attached to the user, which are occassionally updated whilst they are within the game and whose changes need to be sent to the rest of the players within that game.

The problem I have is that (I assume) these user variables would then be sent to everyone as everyone is in the chat room, when it only needs to go to a small amount of users.

Is the solution to set up a custom user variables system with user attached variables (put() get() etc)?

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 41 guests