Difference between revisions of "getVariable"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
(alt syntax)
Line 7: Line 7:
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| Return the value of variable in the variable space of given object or location. In case of Alt Syntax usage in Arma 3, the default value will be returned if:
+
| Return the value of variable in the variable space assigned to various data types. In case of Alt Syntax usage in Arma 3, the default value will be returned if:
 
* Requested variable is either undefined or [[nil]]
 
* Requested variable is either undefined or [[nil]]
 
* Variable namespace is null ([[objNull]], [[grpNull]], etc.)  
 
* Variable namespace is null ([[objNull]], [[grpNull]], etc.)  
Line 20: Line 20:
 
* [[Team_Member]] getVariable [[Array]]
 
* [[Team_Member]] getVariable [[Array]]
 
* [[Task]] getVariable [[String]]
 
* [[Task]] getVariable [[String]]
 +
* [[Task]] getVariable [[Array]] (Since Arma 3 v1.67)
 
* [[Location]] getVariable [[String]]
 
* [[Location]] getVariable [[String]]
 +
* [[Location]] getVariable [[Array]] (Since Arma 3 v1.67)
 
* [[Control]] getVariable [[String]] (since Arma 3 v1.55.133553)
 
* [[Control]] getVariable [[String]] (since Arma 3 v1.55.133553)
 
* [[Control]] getVariable [[Array]] (since Arma 3 v1.55.133553)
 
* [[Control]] getVariable [[Array]] (since Arma 3 v1.55.133553)
 
* [[Display]] getVariable [[String]] (since Arma 3 v1.55.133553)
 
* [[Display]] getVariable [[String]] (since Arma 3 v1.55.133553)
* [[Display]] getVariable [[Array]] (since Arma 3 v1.55.133553)|= Description
+
* [[Display]] getVariable [[Array]] (since Arma 3 v1.55.133553)
 +
When variable is set on [[Task]], it is not actually set on task itself, but on FSM attached to the task. So if there is no FSM [[getVariable]] will not work. |= Description
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  

Revision as of 08:14, 21 January 2017

Template:Command

Notes

Bottom Section

Posted on August 13, 2016 - 17:13 (UTC)
Ebay
NOTE: Arma 2 ONLY! In Arma 3 this will return default value. Warning: the alternative syntax returns undefined when the varspace is an object and that object is null. Example:
_test = objNull getVariable ["test","0"]; systemChat _test; Errors because _test is undefined. Tested in A2OA 1.63.131129