Code: Select all
var variables:Array = new Array();
variables.push(new SFSRoomVariable("currentTurn", -1, VariableType.INT));
variables.push(new SFSRoomVariable("startWithOne", data.pointer.checkbox_0.value));
variables.push(new SFSRoomVariable("colorWalls", data.wall.checkbox_0.value));
variables.push(new SFSRoomVariable("time", data.time.radio_0.value));
variables.push(new SFSRoomVariable("dices", data.dices.radio_0.value));
variables.push(new SFSRoomVariable("teleporters", data.ray.checkbox_0.value));
variables.push(new SFSRoomVariable("isVs", data.vs.checkbox_0.value));
variables.push(new SFSRoomVariable("vs", data.vs.radio_1.value));
//Create a new Chat Room
var settings:SFSGameSettings = new SFSGameSettings("room_" + String(Math.round(Math.random() * 10000)));
settings.maxVariables = 8;
settings.maxUsers = Number(data.players.radio_0.value);
settings.isPublic = Boolean(!data.lock.checkbox_0.value);
settings.minPlayersToStartGame = settings.maxUsers;
settings.notifyGameStarted = true;
settings.isGame = true;
//Set a Room Variable containing the description of the game
settings.variables = variables;
Connector.send(new CreateSFSGameRequest(settings));
I'm attaching an image file with web monitor output.
What could I do to have more than 5 room vars?
Also, what is the $GS Boolean var that shows the web monitor?
Thank you.