gms_self_ismaster
Usage: gms_self_ismaster ( )
Description
Returns whether you are the first player that logged in.
Replies (6)
Last message on 3 Jan 2017
I'm using VS mode and it works fine, both players are moved to the same room, and the game is synced properly, but when I use this function both players are "masters", I have tried to login one player time after the second player, and change their positions in an effort to find a solution, but the result is the same at both players: gms_self_ismaster() returns always "true".
Size43
(Administrator)
on
10 Oct 2016, 18:48:01
Would you be able to check what gms_master_player() returns?
gms_self_ismaster is just a wrapper for gms_master_player() == gms_self_id(), so it returning true for two different players should not be happening.
Hi I'm in the same situation. I am also using VS mode and when I check gms_master_player() == gms_self_playerid() or gms_self_ismaster() they return true in both connected clients. Its probably important to note that this doesn't always happen, and it appears to work correctly the first time I test a freshly compiled version of the game, but doesn't work if I restart the games and test it again.
Size43
(Administrator)
on
3 Jan 2017, 12:38:10
Hey, apologies for my very late response. I've had some issues with my hand that prevented me from using a computer (RSI).
Sounds like both players end up in a different session. What does gms_other_count() return?
I have find a bug
gms_self_ismaster()
//I'm master and guest
gms_self_isguest()
//i'm only guest
Infact this work:
if ( !gms_self_ismaster() )
draw_text(x,y,"guest");
else
draw_text(x,y,"master");
This don't work, because when i'm master, it drawn "master" and "guest", case guest it drawn only "guest":
if ( gms_self_ismaster() )
draw_text(x,y,"master");
if ( gms_self_isguest() )
draw_text(x,y,"guest");
Size43
(Administrator)
on
11 Jan 2016, 12:21:00
Master and guest are not each others inverse. The 'master' is exactly one player, a guest is simply someone who's logged in under a username that does not have an account associated with it.