gms_vs_end

Usage: gms_vs_end ( )

Description

Stops the VS mode game and moves all players to the lobby. The script (server_script_set_vs_end) will be called too.

Replies (5)

Last message on 2 Nov 2021

AUGEgames on 15 Mar 2021, 18:01:39
I have an error from the player that is not host:


___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object GMS:

ds_map_find_value argument 1 incorrect type (undefined) expecting a Number (YYGI32)
at gml_Script_XServer_updateposition
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_XServer_updateposition (line -1)
gml_Script_XServer_step
gml_Script_gms_step
gml_Object_GMS_Step_0

And the host is just not responding to the function at all
Size43 (Administrator) on 4 Apr 2021, 16:26:24
Apologies for the delay. Are you using gms_optimize_set_spc by any chance?

Also, please make sure you do not have any instances of the other player object in any of your rooms. The extension will automatically create these when needed.

If neither of these things resolve the problem, could you share the code you're using to set up the extension?
AUGEgames on 2 Nov 2021, 16:48:13
Hi, sorry I took a long break. I am back now for longer than ever! Anyway, I sent you the project to your email. Check it out if you can. This is a function I want to use for other games too as I want to end game and go back to lobby or back to menu.
Arcadian on 24 Oct 2019, 06:47:23
If you use gms_vs_end(), the VS mode ends. But how do you restart it, again?

It´s needed something like gms_vs_start(), so you can stop it but also restart it, isn´t it?
Size43 (Administrator) on 9 Nov 2019, 13:14:31
After gms_vs_end, everyone will automatically be moved to the lobby again, so the matchmaking is restarted automatically. Just make sure you're also moving back to the lobby room immediately after calling gms_vs_end, so you can see the timer count down.