gms_vs_ready

Usage: gms_vs_ready ( )

Description

Returns whether there are enough players online to start the game. If so, the game will be started immediately. It's essential to move every player to the appropriate room, as soon as server_vs_ready returns true.

Example

//Lobby room, step event
if(gms_vs_ready())
{
    room_goto(rm_play);
}

Replies (9)

Last message on 17 Dec 2016

Arcadian on 11 Dec 2016, 12:13:26
Is there any way to put a "switch" in a VS Mode game, so the players are only moved to playing room if they match a condition? For example, you have a VS Mode game, but it only starts when the players have clicked a "I'm ready!!" button of the game. I think actually the players are moved in any case, and I want to check that condition in order to move the players involved in a certain session.
Size43 (Administrator) on 16 Dec 2016, 21:10:51
There's no option for this in the VS mode system, however you can implement it using the session functions.
Arcadian on 17 Dec 2016, 16:16:50
So, while using VS mode, if I don´t set a gm_vs_ready() script (in order to move the players involved in a session to another room), these players are moved in any case?
Miksamoo on 16 Jan 2015, 13:57:44
(And message length limit) In GMS object's game_end event I have gms_logout() function. Sometimes there is no error.
Miksamoo on 16 Jan 2015, 13:55:09
I have problem. When there are enough players to start a game, and first player is started a game, all clients get this error:
___________________________________________
############################################################################################
ERROR in
action number 1
of Step Event0
for object GMS:

Player possibly logged out without calling server_logout, and is now stuck in the server. (id = 73898, 3)
at gml_Script_XServer_error (line 3) - show_error(argument0, false);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_XServer_error (line 3)
called from - gml_Script_gms_step (line 159) - XServer_error(gms_action_get_argument_string(0));
called from - gml_Object_GMS_StepNormalEvent_1 (line 1) - gms_step()

I know what this is meaning, but I don't understand why it gets this.
Size43 (Administrator) on 16 Jan 2015, 18:18:37
Would you be able to mail (gamemakerserver@outlook.com) me a .gmz that I can use to reproduce this issue?
Miksamoo on 16 Jan 2015, 23:22:58
Yes I can send it, but my projekt is in my school's computer. Possibly on friday I send it.
Size43 (Administrator) on 28 Jan 2015, 15:57:59
Hey,

I've got a fix ready which will fix the crash. (your game has another bug, but I think you'll figure that out pretty quickly after the fix goes live). Because the server has to move to another physical server on Saturday, I won't be uploading the fix right now.

Once the server is up and running again, I'll update the server with the new patch. I'll let you know when that happens.

Size43
Size43 (Administrator) on 16 Jan 2015, 23:31:17
That's fine :)