Page 1 of 1

room asignment

Posted: 21 Jun 2010, 05:59
by creat326
Hi everyone,

New to sfs and writing an extension. I want to achieve the following:
A player hits "play" on the game and the server gets the requests.

1) it looks at its current rooms and see if any has less than 8 players.
a) if one has less than 8 players, puts him into one of them and begins game
b) if all rooms are full (8 players), creates a new room, adds it and begins game

I saw the examples and i see how to create rooms, but any way to iterate and check players and make them join? I'm sure it's a simple loop but I can't figure it out.

Thanks
Joaquin Grech

Posted: 21 Jun 2010, 07:52
by ThomasLund
Hi Joaquin and welcome

My bet is that you will have a better chance of someone answering your post over in the server side extension part of the forums:

http://forums.smartfoxserver.com/viewforum.php?f=4

The question isnt really Unity specific, and I dont think the more hardcore extension developers come here to check.

Best
Thomas