loadGame: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "")
m (Some wiki formatting)
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma2
|game1= arma2
|version1= 1.00


|1.00
|game2= arma2oa
|version2= 1.50


|gr1= Mission Information
|game3= tkoh
|version3= 1.00


| Loads game from the last autosave made with [[saveGame]]. If no autosave exists, restarts the mission. When used in campaign it will also deduct 1 life, defined in:<br>
|game4= arma3
<tt>[[campaignConfigFile]] / "Campaign" / &lt;battle&gt; / &lt;mission&gt; / "lives"</tt><br><br>
|version4= 0.50
{{Informative | A [[addMissionEventHandler | mission event handler]] [[Arma_3:_Event_Handlers/addMissionEventHandler#Loaded | <tt>"Loaded"</tt>]] is available and is important that it is added in <tt>preInit</tt> in order for it to fire on load from save}}


| '''loadGame'''
|gr1= Mission Information


|p1=
|descr= Loads game from the last autosave made with [[saveGame]].
If no autosave exists, restarts the mission. When used in campaign it will also deduct 1 life, defined in:
<sqf>campaignConfigFile >> "Campaign" / "ChapterName" / "MissionName" / "lives"</sqf>


|p2=
{{Feature|informative|
A {{hl|[[Arma 3: Mission Event Handlers#Loaded|"Loaded"]]}} [[addMissionEventHandler|mission event handler]] is available;
it is important that it is added in {{hl|preInit}} in order for it to fire on load from save.
}}


|p3=
|s1= [[loadGame]]


| [[Nothing]]
|r1= [[Nothing]]


|x1= <sqf>loadGame;</sqf>


|x1= <code>[[loadGame]];</code>
|seealso= [[enableSaving]] [[saveGame]] [[savingEnabled]] [[isSaving]]
 
 
| [[enableSaving]], [[saveGame]], [[savingEnabled]]
 
|  |MPBEHAVIOUR=
}}
}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 20:23, 21 March 2024

Hover & click on the images for description

Description

Description:
Loads game from the last autosave made with saveGame. If no autosave exists, restarts the mission. When used in campaign it will also deduct 1 life, defined in:
campaignConfigFile >> "Campaign" / "ChapterName" / "MissionName" / "lives"
A "Loaded" mission event handler is available; it is important that it is added in preInit in order for it to fire on load from save.
Groups:
Mission Information

Syntax

Syntax:
loadGame
Return Value:
Nothing

Examples

Example 1:
loadGame;

Additional Information

See also:
enableSaving saveGame savingEnabled isSaving

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note