REGULAR ROOM?

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

Moderators: Lapo, Bax

JCRobinson
Posts: 14
Joined: 30 Nov 2008, 00:35

REGULAR ROOM?

Postby JCRobinson » 07 Dec 2008, 10:12

This was within another post that I don't think anyone would see so I have made this new post to focus on the issue:

I just dug this out of the documentation within the “Application Architectureâ€
User avatar
Lapo
Site Admin
Posts: 21790
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 08 Dec 2008, 17:42

If so, Is there a way to removing the room when it is empty regardless of the creators connection status ?

Yes, you can remove it from server side.
You listen for the userLost server side event and you decide what to do when everyone has "left the building".

Note ... the event is fired BEFORE the user is physically removed from the room, to allow checking which room the user was in and perform any logic related to those rooms.

This means that when the last user goes away the room user count will still be == 1. The user is remove AFTER you have dealt with the event
Lapo
--
gotoAndPlay()
...addicted to flash games
JCRobinson
Posts: 14
Joined: 30 Nov 2008, 00:35

Thanks Lapo

Postby JCRobinson » 09 Dec 2008, 09:13

Nice one Lapo

I will take a look at it, I also noticed a way how I can split users in to groups within one room, so the need for multiple rooms in the way I was looking at it, is no longer needed.

Actually the way the regular room runs is fine for this new way of dealing with users.

Thanks again
John
x.Mara.x
Posts: 23
Joined: 18 Dec 2008, 20:03

forever

Postby x.Mara.x » 19 Dec 2008, 19:53

I see this is the best topic to post this..

what if i want the room to stay there forever? when the owner goes.. what if i want to make it remain there

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 30 guests