loadGame: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Undo revision 103926 by Revo (talk) it works for hosted MP)
m (Some wiki formatting)
 
(47 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| Load a game from the autosave. <br>If failed, restart the mission. |= Description
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| '''loadGame''' |= Syntax
|game4= arma3
|version4= 0.50


|p1= |= PARAMETER1
|gr1= Mission Information


|p2= |= PARAMETER2
|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:
|p3= |= PARAMETER3
<sqf>campaignConfigFile >> "Campaign" / "ChapterName" / "MissionName" / "lives"</sqf>
 
| [[Nothing]] |= RETURNVALUE


{{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.
}}


|x1= <code>[[loadGame]];</code>|= EXAMPLE1
|s1= [[loadGame]]


____________________________________________________________________________________________
|r1= [[Nothing]]


| [[enableSaving]], [[saveGame]], [[savingEnabled]] |= SEEALSO
|x1= <sqf>loadGame;</sqf>


| |= MPBEHAVIOUR
|seealso= [[enableSaving]] [[saveGame]] [[savingEnabled]] [[isSaving]]
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[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