getUnitTrait: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<br />" to "<br>") |
Lou Montana (talk | contribs) (Fix Category:Pages using duplicate arguments in template calls and add getAllUnitTraits link) |
||
Line 4: | Line 4: | ||
|arg= global |MParg= | |arg= global |MParg= | ||
| 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]].}} |DESCRIPTION= | |||
For the default values please visit [[setUnitTrait]]. | |||
|unit [[getUnitTrait]] skillName |SYNTAX= | |||
|unit | |||
|p1= Unit: [[Object]] |PARAMETER1= | |p1= Unit: [[Object]] |PARAMETER1= | ||
|p2= skillName: [[String]] - Name of the skill | | |p2= skillName: [[String]] - Name of the skill |PARAMETER2= | ||
| [[Bool]] or [[ | | | ||
* [[Bool]] or [[Number]] - trait's value | |||
* [[Nothing]] - if ''unit'' is invalid, e.g an empty vehicle |RETURNVALUE= | |||
|x1= <code>[[player]] [[getUnitTrait]] "Medic";</code>|EXAMPLE1= | |x1= <code>[[player]] [[getUnitTrait]] "Medic";</code>|EXAMPLE1= | ||
| [[setUnitTrait]]|SEEALSO= | | [[setUnitTrait]], [[getAllUnitTraits]] |SEEALSO= | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= | ||
}} | }} | ||
<h3 style='display:none'>Bottom Section</h3> | <h3 style='display:none'>Bottom Section</h3> | ||
<h3 style='display:none'>Notes</h3> | <h3 style='display:none'>Notes</h3> |
Revision as of 15:44, 5 June 2020
Description
- Description:
- Gets the current value of a trait of the given unit.
- Groups:
- Uncategorised
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