loadGame: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Some wiki formatting)
Line 16: Line 16:


|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:<br>
|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:<br>
{{hl|[[campaignConfigFile]] / "Campaign" / &lt;battle&gt; / &lt;mission&gt; / "lives"}}{{Feature | Informative | A [[addMissionEventHandler | mission event handler]] [[Arma 3: Mission Event Handlers#Loaded | {{hl|"Loaded"}}]] is available and is important that it is added in {{hl|preInit}} in order for it to fire on load from save}}
<sqf>campaignConfigFile >> "Campaign" / <battle> / <mission> / "lives"</sqf>
{{Feature|informative|A {{hl|[[Arma 3: Mission Event Handlers#Loaded | "Loaded"]]}} [[addMissionEventHandler|mission event handler]] is available and it is important that it is added in {{hl|preInit}} in order for it to fire on load from save.}}


|s1= '''loadGame'''
|s1= [[loadGame]]


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


|x1= <code>[[loadGame]];</code>
|x1= <sqf>loadGame;</sqf>


|seealso= [[enableSaving]] [[saveGame]] [[savingEnabled]] [[isSaving]]
|seealso= [[enableSaving]] [[saveGame]] [[savingEnabled]] [[isSaving]]
}}
}}

Revision as of 16:25, 10 May 2022

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" / <battle> / <mission> / "lives"
A "Loaded" mission event handler is available and 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