allVariables: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(61 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3dev |= Game name
|game1= arma3
|version1= 1.38


| 1.37 |= Game version
|gr1= Namespaces
____________________________________________________________________________________________
|gr2= Variables


| Returns a list of all variables from desired namespace. Namespaces supported:<br>
|mp= {{Feature|important|Using [[profileNamespace]] and [[uiNamespace]] with this command has been disabled in multiplayer in {{GVI|arma3|1.40}} - see {{Link|https://forums.bohemia.net/forums/topic/140837-development-branch-changelog/?do{{=}}findComment&comment{{=}}2869646|Changelog}}.}}
* CONTROL
* TEAM_MEMBER
* NAMESPACE
* OBJECT
* GROUP
* TASK
* LOCATION
|= Description
____________________________________________________________________________________________


|descr= Returns a list of all variables from the desired namespace.


| '''allVariables''' namespace |= Syntax
|s1= [[allVariables]] namespace


| p1= namespace: [[Control]], [[Team Member]], [[Namespace]], [[Object]], [[Group]], [[Task]], [[Location]] |=
|p1= namespace: [[Namespace]], [[Object]], [[Group]], [[Task]], [[Location]], [[Team Member]], {{GVI|arma3|2.02|size= 0.75}} [[Control]], {{GVI|arma3|2.02|size= 0.75}} [[Display]]


| [[Array]] of [[String]]s - array of variable names |= RETURNVALUE
|r1= [[Array]] of [[String]]s - array of variable names. All names are in lower case (see [[toLower]])
____________________________________________________________________________________________


| x1= <code>_allVars = [[allVariables]] [[uiNamespace]];</code>|= EXAMPLE1
|x1= <sqf>_allVarsUINamespace = allVariables uiNamespace;</sqf>
____________________________________________________________________________________________


| [[allControls]], [[allDisplays]], [[allCurators]], [[allGroups]], [[allDead]], [[allDeadMen]] |= SEEALSO
|x2= <sqf>_allVarsTrigger = allVariables trigger1;</sqf>


| |= MPBEHAVIOUR
|seealso= [[allControls]] [[allDisplays]] [[allCurators]] [[allGroups]] [[allDead]] [[allDeadMen]]
____________________________________________________________________________________________
}}
}}


<h3 style='display:none'>Notes</h3>
{{Note
<dl class='command_description'>
|user= longbow
<!-- Note Section BEGIN -->
|timestamp= 20161001235400
 
|text= One still can use [[allVariables]] in Multiplayer against [[profileNamespace]] and [[uiNamespace]] using config parser. In [[Description.ext]]
<!-- Note Section END -->
<sqf>_EXEC(someVar = allVariables profileNamespace)</sqf>
</dl>
in code
 
<sqf>_allProfileVars = parsingNamespace getVariable "someVar"</sqf>
<h3 style='display:none'>Bottom Section</h3>
but this list will be valid only at the moment of config parsing.
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 16:11, 15 March 2023

Hover & click on the images for description

Description

Description:
Returns a list of all variables from the desired namespace.
Multiplayer:
Using profileNamespace and uiNamespace with this command has been disabled in multiplayer in Arma 3 logo black.png1.40 - see Changelog.
Groups:
NamespacesVariables

Syntax

Syntax:
allVariables namespace
Parameters:
namespace: Namespace, Object, Group, Task, Location, Team Member, Arma 3 logo black.png2.02 Control, Arma 3 logo black.png2.02 Display
Return Value:
Array of Strings - array of variable names. All names are in lower case (see toLower)

Examples

Example 1:
_allVarsUINamespace = allVariables uiNamespace;
Example 2:
_allVarsTrigger = allVariables trigger1;

Additional Information

See also:
allControls allDisplays allCurators allGroups allDead allDeadMen

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
longbow - c
Posted on Oct 01, 2016 - 23:54 (UTC)
One still can use allVariables in Multiplayer against profileNamespace and uiNamespace using config parser. In Description.ext
_EXEC(someVar = allVariables profileNamespace)
in code
_allProfileVars = parsingNamespace getVariable "someVar"
but this list will be valid only at the moment of config parsing.