os_browser
Returns: Constant
This variable holds one of various constant GameMaker: Studio has to tell you which browser you are currently running the game in (if any). The following constants can be returned:
Constant | Description |
---|---|
browser_not_a_browser | Game is not being played in a browser |
browser_unknown | Unknown browser |
browser_ie | Internet Explorer |
browser_firefox | Mozilla Firefox |
browser_chrome | Google Chrome |
browser_safari | Safari |
browser_opera | Opera |
browser_safari_mobile | Safari Mobile |
browser_windows_store | Windows UWP App |
if os_browser == browser_not_a_browser
{
global.Config = 0;
}
else
{
global.Config = 1;
}
The above code checks to see if the game is running in a browser or not and sets a global variable to a value depending on the result of the check.