getUnitTrait: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
|arma3 | |||
|1.58 | |game1= arma3 | ||
|version1= 1.58 | |||
|arg= global | |arg= global | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
| Gets the current value of a trait of the given unit. | |descr= Gets the current value of a trait of the given unit. | ||
{{Feature | Informative | For the default values please visit [[setUnitTrait]].}} | {{Feature | Informative | For the default values please visit [[setUnitTrait]].}} | ||
|unit [[getUnitTrait]] skillName | |s1= unit [[getUnitTrait]] skillName | ||
|p1= Unit: [[Object]] | |p1= Unit: [[Object]] | ||
|p2= skillName: [[String]] - Name of the skill | |p2= skillName: [[String]] - Name of the skill | ||
| | |||
|r1= | |||
* [[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> | ||
|seealso= [[setUnitTrait]], [[getAllUnitTraits]] | |seealso= [[setUnitTrait]], [[getAllUnitTraits]] | ||
}} | }} |
Revision as of 15:39, 9 June 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