getUnitTrait: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
|arma3 | |arma3 | ||
|1.58 | |1.58 | ||
|arg= global |MParg= | |arg= global |MParg= | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
| Gets the current value of a trait of the given unit. | | Gets the current value of a trait of the given unit. | ||
{{Informative | For the default values please visit [[setUnitTrait]].}} | {{Informative | For the default values please visit [[setUnitTrait]].}} | ||
|unit [[getUnitTrait]] skillName | |unit [[getUnitTrait]] skillName | ||
|p1= Unit: [[Object]] | |p1= Unit: [[Object]] | ||
|p2= skillName: [[String]] - Name of the skill | |p2= skillName: [[String]] - Name of the skill | ||
| | | | ||
* [[Boolean]] or [[Number]] - trait's value | * [[Boolean]] or [[Number]] - trait's value | ||
* [[Nothing]] - if ''unit'' is invalid, e.g an empty vehicle | * [[Nothing]] - if ''unit'' is invalid, e.g an empty vehicle | ||
|x1= <code>[[player]] [[getUnitTrait]] "Medic";</code> | |x1= <code>[[player]] [[getUnitTrait]] "Medic";</code> | ||
| [[setUnitTrait]], [[getAllUnitTraits]] | | [[setUnitTrait]], [[getAllUnitTraits]] | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= | ||
}} | }} |
Revision as of 00:42, 18 January 2021
Description
- Description:
- Gets the current value of a trait of the given unit.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- unit getUnitTrait skillName
- Parameters:
- Unit: Object
- skillName: String - Name of the skill
- Return Value:
Examples
- Example 1:
player getUnitTrait "Medic";
Additional Information
- See also:
- setUnitTraitgetAllUnitTraits
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