Offline and Online modes

Posted by Franri
What would be the best approach to make an offline mode and an online mode? I'm guessing it's something like 'if offline mode, go to offline room; if online mode, show login and go to online room', but what if the player wants to disconnect and play offline later on? Is there a way to do that?

Replies (1)

Last message on 14 Feb 2021

Size43 (Administrator) on 14 Feb 2021, 15:37:50
You can use gms_logout to log the player out of their account. If the gameplay is exactly the same for online and offline mode, you could also create wrapper scripts around the gms_* functions, which either call the gms_* function if some global variable (let's say global.is_online) is true, and don't call the gms_* function if the global variable is false.