enableSaving: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Examples added from A2 campaign and testing.)
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]2(\|.*)\]\]" to "{{GameCategory|arma2|Scripting Commands}}")
(23 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{Command|Comments=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
| arma2 |Game name=


|1.00|= Game version
|1.00|Game version=
 
|gr1= Mission Information |GROUP1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| Enable / disable saving of the game. When disabled,the autosave is created (if not forbidden by save == false). |= Description
| Enable / disable saving of the game with an optional autosave. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''enableSaving''' enable or [enable,save] |= Syntax
| [[enableSaving]] enable |SYNTAX=


|p1= [enable,save]: Array -  |= PARAMETER1
|p1= enable: [[Boolean]] |PARAMETER1=  


|p2= |= PARAMETER2
| [[Nothing]] |RETURNVALUE=


|p3= |= PARAMETER3
____________________________________________________________________________________________


| Nothing |= RETURNVALUE
|s2= [[enableSaving]] [enable, save] |SYNTAX2=


|p21= enable: [[Boolean]] - allow manual saving |PARAMETER21=


|x1= <pre>
|p22= save: [[Boolean]] - create an autosave on command execution |PARAMETER22=
enableSaving false; // Saving disabled and make autosave.
enableSaving true; // Saving enabled without autosave.
 
enableSaving [false, false]; // Saving disabled without autosave.
enableSaving [false, true]; // Saving disabled and make autosave.
enableSaving [true, false]; // Saving enabled without autosave.
enableSaving [true, true]; // Saving enabled without autosave.
</pre>|= EXAMPLE1


|r2= [[Nothing]] |RETURNVALUE2=
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= SEEALSO
|x1= <code>[[enableSaving]] [[false]]; {{cc|saving disabled, does autosave - same as [<nowiki/>[[false]], [[true]]]}}
[[enableSaving]] [[true]]; {{cc|saving enabled, doesn't autosave - same as [<nowiki/>[[true]], [[false]]]}}


| |= MPBEHAVIOUR
[[enableSaving]] [<nowiki/>[[false]], [[false]]]; {{cc|saving disabled, doesn't autosave}}
[[enableSaving]] [<nowiki/>[[false]], [[true]]]; {{cc|saving disabled, does autosave}}
[[enableSaving]] [<nowiki/>[[true]], [[false]]]; {{cc|saving enabled, doesn't autosave}}
[[enableSaving]] [<nowiki/>[[true]], [[true]]]; {{cc|saving enabled, does autosave}}
</code>|EXAMPLE1=  
____________________________________________________________________________________________
____________________________________________________________________________________________
| [[loadGame]], [[saveGame]], [[savingEnabled]] |SEEALSO=
}}
}}


Line 47: Line 50:


<h3 style='display:none'>Bottom Section</h3>
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 21:54, 8 January 2021

Hover & click on the images for description

Description

Description:
Enable / disable saving of the game with an optional autosave.
Groups:
Mission Information

Syntax

Syntax:
enableSaving enable
Parameters:
enable: Boolean
Return Value:
Nothing

Alternative Syntax

Syntax:
enableSaving [enable, save]
Parameters:
enable: Boolean - allow manual saving
save: Boolean - create an autosave on command execution
Return Value:
Nothing

Examples

Example 1:
enableSaving false; // saving disabled, does autosave - same as [false, true] enableSaving true; // saving enabled, doesn't autosave - same as [true, false] enableSaving [false, false]; // saving disabled, doesn't autosave enableSaving [false, true]; // saving disabled, does autosave enableSaving [true, false]; // saving enabled, doesn't autosave enableSaving [true, true]; // saving enabled, does autosave

Additional Information

See also:
loadGamesaveGamesavingEnabled

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

Notes

Bottom Section