saveVar: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| ofp |Game name= | | ofp |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Variables |GROUP1= | |gr1= Variables |GROUP1= | ||
| Save variable value into the campaign space. This variable is available to all following missions in the campaign. |DESCRIPTION= | | Save variable value into the campaign space. This variable is available to all following missions in the campaign. |DESCRIPTION= | ||
| '''saveVar''' varname |SYNTAX= | | '''saveVar''' varname |SYNTAX= | ||
Line 17: | Line 14: | ||
| [[Nothing]] |RETURNVALUE= | | [[Nothing]] |RETURNVALUE= | ||
|x1= <code>[[saveVar]] "varOne"</code> |EXAMPLE1= | |x1= <code>[[saveVar]] "varOne"</code> |EXAMPLE1= | ||
| |SEEALSO= | | |SEEALSO= |
Revision as of 02:15, 17 January 2021
Description
- Description:
- Save variable value into the campaign space. This variable is available to all following missions in the campaign.
- Groups:
- Variables
Syntax
Examples
- Example 1:
saveVar "varOne"
Additional Information
- See also:
- See also needed
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
- Posted on January 28, 2009 - 22:56 (CET)
- Wolfrug
- If you try to saveVar a vehicle saved in your variable (SavedVars = [Car1]; saveVar "SavedVars"), then Car1 will not be properly "saved", refering to ObjNull if you try to use it in subsequent missions, even if a vehicle with the same vehicle varname exists. To get around this, save the vehicle's varname as a string (SavedVars = [str(Car1)]) and then when you need it just use call compile to "unstring" the varname (_car = call compile (SavedVars select 0);).
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Variables
- Scripting Commands OFP 1.99
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands