I'm getting confused about Zone and Room variables.
if I declare a variables at the Zone extention and update it from one of the room, does it get update for all the rooms inside the same zone? (In other word, do all the rooms share the same variables from zone Extention?)
And what about variable from Room Extention?
Question about Room and Zone Extention variables
I'm so confused... not getting any of this from reading all the provided documents. I kinda draw conclusion from the examples and here's what I get ->
1. Any variables declaring from Zone and Room Extensions are created anew everytime a new room is created, not when the server started.
2. Only those declared as RoomVariables send update respense to users.
3. Zone and Room can only send variables to each other with handleInternalRequest. This add to CPU loaded and should it be avoid when possible.
4. Init are called once, when the server started.
Is this right?
1. Any variables declaring from Zone and Room Extensions are created anew everytime a new room is created, not when the server started.
2. Only those declared as RoomVariables send update respense to users.
3. Zone and Room can only send variables to each other with handleInternalRequest. This add to CPU loaded and should it be avoid when possible.
4. Init are called once, when the server started.
Is this right?
Answering my own Q.
1. No. Variables inside Zone extension are created once, and can only be changed with its own internal logic. Same thing with variables that are declared inside room extension (and not defined as 'room variables') are created once upon the script initialized, not when room are created.
Only 'room variables' are created anew once a room is newly created.
Am I getting close?
Question is, how do I create Room internal variables that do not send update to the clients?
1. No. Variables inside Zone extension are created once, and can only be changed with its own internal logic. Same thing with variables that are declared inside room extension (and not defined as 'room variables') are created once upon the script initialized, not when room are created.
Only 'room variables' are created anew once a room is newly created.
Am I getting close?
Question is, how do I create Room internal variables that do not send update to the clients?
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 42 guests