{"name":"isGamePaused","operator":null,"title":"isGamePaused","type":"command","url":"https://community.bistudio.com/wiki/isGamePaused","revid":349063,"updated":"2023-11-08T14:47:20Z","groups":["System"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.96"}],"since":{"game":"arma3","name":"Arma 3","version":"1.96"},"arma3_since":"1.96","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns the state of game simulation. Simulation can get paused by pressing <kbd>Alt</kbd>+<kbd>Tab</kbd> or a system dialog opening (e.g. <kbd>Esc</kbd> menu).\nSimulation will not get paused if `-noPause` startup parameter is used.\n\n> [!NOTE]\n> onEachFrame event and `\"EachFrame\"` event handler continue to execute when the simulation is paused, which could result in undesired backlog. Use isGamePaused to skip loop if needed.","syntaxes":[{"syntax":"isGamePaused","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Boolean","types":["Boolean"],"description":"returns true if game simulation is paused, false if not","text":"Boolean - returns true if game simulation is paused, false if not"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\nonEachFrame \n{\n    if (isGamePaused) exitWith {};\n    // ...do stuff\n};\n```","code":["onEachFrame \n{\n\tif (isGamePaused) exitWith {};\n\t// ...do stuff\n};"]}],"multiplayer":"In multiplayer the simulation will not get paused and this command will always return false.","problems":null,"aliases":[],"see_also":["isGameFocused"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: System","Introduced with Arma 3 version 1.96","Scripting Commands"]}