I'm working on a game and I wanted to make it so there were only 2 players in the game and the others could spectate the match. Is there a way to get the specific order when you joined a session, or can I just use gms_other_find to find this join order?
Replies (1)
Last message on 31 Oct 2021
Size43
(Administrator)
on
31 Oct 2021, 16:32:48
You'll have to keep track of the order yourself.
Since it's only two players, I'd suggest just using two global (
gms_global_get/
gms_global_set) variables to store the playerIDs of the first two players that join. Each player can do this themselves by checking if the variables exist
gms_global_exists, and if they don't, assigning their own playerID to the variable.