getAllUnitTraits: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Add 2.16 syntax) |
(Combined Syntax 1 and 2) |
||
Line 8: | Line 8: | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
|descr= Returns unit traits | |descr= Returns unit traits (native or set by [[setUnitTrait]]). | ||
|s1= [[getAllUnitTraits]] unit | |s1= [[getAllUnitTraits]] unit | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] or {{GVI|arma3|2.16|size= 0.75}} [[String]] - a unit or a class name | ||
|r1= [[Array]] of [[Array]]s in format [name, value] where: | |r1= [[Array]] of [[Array]]s in format [name, value] where: | ||
* name: [[String]] - trait's name | * name: [[String]] - trait's name | ||
* value [[String]] or [[Boolean]] - trait's value | * value [[String]] or [[Boolean]] - trait's value | ||
|x1= <sqf> | |x1= <sqf> | ||
/* | /* | ||
Could return something like this: | |||
[ | [ | ||
["Medic", false], | ["Medic", false], | ||
Line 48: | Line 41: | ||
</sqf> | </sqf> | ||
|x3= Since {{GVI|arma3|2.16|size= 0.75}} | |x3= Since {{GVI|arma3|2.16|size= 0.75}}: | ||
<sqf> | <sqf> | ||
/* | /* | ||
Line 64: | Line 57: | ||
</sqf> | </sqf> | ||
|seealso= [[setUnitTrait]] | |seealso= [[getUnitTrait]] [[setUnitTrait]] | ||
}} | }} |
Revision as of 19:57, 24 October 2023
Description
- Description:
- Returns unit traits (native or set by setUnitTrait).
- Groups:
- Object Manipulation
Syntax
- Syntax:
- getAllUnitTraits unit
- Parameters:
- unit: Object or 2.16 String - a unit or a class name
- Return Value:
- Array of Arrays in format [name, value] where:
Examples
- Example 1:
- Example 2:
- Example 3:
- Since 2.16:
Additional Information
- See also:
- getUnitTrait setUnitTrait
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