{"name":"loadGame","operator":null,"title":"loadGame","type":"command","url":"https://community.bistudio.com/wiki/loadGame","revid":353705,"updated":"2024-03-21T18:23:51Z","groups":["Mission Information"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Loads game from the last autosave made with saveGame.\nIf no autosave exists, restarts the mission. When used in campaign it will also deduct 1 life, defined in:\n\n```sqf\ncampaignConfigFile >> \"Campaign\" / \"ChapterName\" / \"MissionName\" / \"lives\"\n```\n\n> [!NOTE]\n> A `\"Loaded\"` mission event handler is available;\n> it is important that it is added in `preInit` in order for it to fire on load from save.","syntaxes":[{"syntax":"loadGame","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\nloadGame;\n```","code":["loadGame;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["enableSaving","saveGame","savingEnabled","isSaving"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Mission Information","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}