Page 1 of 1

Quick question n.2: _server.createRoom

Posted: 06 Oct 2009, 20:52
by mistermind
I noticed this is not clear in the documentation so here it goes:
Page: ... eRoom.html

By creating a room server from an extension that is a game (roomObj.isGame = true) does it automatically join the room creator like the client side coding? If so, does exitCurrentRoom=false works?

Code: Select all

var roomObj:Object = new Object(); = params.r;
roomObj.isGame = true;
roomObj.maxU =2;
roomObj.exitCurrentRoom = false;
var newGameRoom = _server.createRoom(roomObj, user, false, false);

Posted: 13 Oct 2009, 17:34
by mistermind
Let me refine my question:
the create room method from the client API tells us that when a room is a game room (isGame = true) it automatically joins the creator of that room in. In order for that user not to leave the previous room, there is a tag called exitCurrentRoom where you set it to false during the creation.

Problem is that the _server.createRoom also has the isGame, but not the exitCurrentRoom (or at least not specified in the docs).

So my questions are:
Does the isGame tag also automatically joins the user in from _server.createRoom?
If so, does that forces the user to leave the previous room? Is there a way to stop it?

Posted: 14 Oct 2009, 08:39
by Lapo
No, from server side you don't get this automatic behavior.
You can choose to join a User immediately after creation or not, but by default nothing the User will remain were he is.

On the server side you can create a Room at any time and assign it to a User or the Server so we don't automate the joining operation

Posted: 15 Oct 2009, 17:35
by mistermind
Thanks lapo thats what I needed to know :)