Hi! I've been struggling for a while now trying to use Sessions to make an "Among Us Style" kind of room system. I have absolutely no idea what I am doing.
My game is basically a unique attempt at FNaF Multiplayer. The guard is in the office like normal, looking through cameras. And the animatronics are all in 8bit free roam. I have already set up everything to rely on variables. The game knows what to display for the guard based on the variables from the 8bit animatronics moving around.
Like I said, I have no idea how to make these private rooms work. I've been looking into it but clearly haven't been understanding something. Can anyone lend me a hand?
Replies (5)
Last message on 3 Nov 2021
Size43
(Administrator)
on
14 Oct 2021, 19:45:01
If your game works perfectly right now "without" sessions, it'll work perfectly with multiple sessions as well, so you won't need to change anything w.r.t. gameplay.
I'd recommend checking out the
sessions tutorial. You could either generate a room code and store it in the session tag, or just use session IDs directly.
Is there anything specific that you're having trouble with? Do you already have some code that maybe doesn't work quite right?
Arthur
(Topicstarter)
on
3 Nov 2021, 04:26:09
You mentioned being able to store room codes in a session tag. But how would one join through that tag? It seems everything relies on session IDs.
Arthur
(Topicstarter)
on
3 Nov 2021, 07:06:26
oh nevermind i figured it out. wooooooo! got the rooms working!
Arthur
(Topicstarter)
on
16 Oct 2021, 09:48:27
I think my major issue is the variable sharing. I was trying to have the game check the variables of other players to know what to display?
Variable checking is what the game desperately needs to work. I need any player in the session to be able to check/update a list of variables no matter what room they're in. Is that possible?
Size43
(Administrator)
on
31 Oct 2021, 16:15:24
That sounds like you're looking for global variables. Global variables are the same for all players in a session. You can set and get them with
gms_global_get and
gms_global_set.