How could I know where I'm

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
Wei
Posts: 50
Joined: 13 Jun 2017, 08:16

How could I know where I'm

Postby Wei » 03 Aug 2017, 16:19

which one is the current room? It's not the first or the last one on the list.

Code: Select all

List<Room> rooms = sfs.RoomList;


Is there a way to get which room I'm in? The game will run another c# script without SFSEvent.ROOM_JOIN when uer joined a game room, or I have to pass a Room object from another c# script which has already triggered SFSEvent.ROOM_JOIN?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How could I know where I'm

Postby Lapo » 03 Aug 2017, 16:30

sfs.LastJoinedRoom is what you're looking for :)
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Wei
Posts: 50
Joined: 13 Jun 2017, 08:16

Re: How could I know where I'm

Postby Wei » 03 Aug 2017, 16:38

Thanks, this is really a stupid question to ask.

how could I miss this one, I looked SmartFox Properties.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How could I know where I'm

Postby Lapo » 03 Aug 2017, 18:05

No worries
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 58 guests