Usage: gms_self_ismaster ( )


Returns whether you are the first player that logged in.

Replies (6)

Last message on 3 Jan 2017

Arcadian on 28 Sep 2016, 07:06:17
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.
QuickshotCheesy on 19 Dec 2016, 21:58:00
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?
innominato on 9 Jan 2016, 00:08:07
I have find a bug

//I'm master and guest
//i'm only guest

Infact this work:
if ( !gms_self_ismaster() )

This don't work, because when i'm master, it drawn "master" and "guest", case guest it drawn only "guest":
if ( gms_self_ismaster() )
if ( gms_self_isguest() )
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.