getUnitTrait: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "Bool" to "Boolean")
Line 10: Line 10:
|p2= skillName: [[String]] - Name of the skill |PARAMETER2=
|p2= skillName: [[String]] - Name of the skill |PARAMETER2=
|
|
* [[Bool]] or [[Number]] - trait's value
* [[Boolean]] or [[Number]] - trait's value
* [[Nothing]] - if ''unit'' is invalid, e.g an empty vehicle |RETURNVALUE=
* [[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=  

Revision as of 01:22, 24 August 2020

Hover & click on the images for description

Description

Description:
Gets the current value of a trait of the given unit.
For the default values please visit setUnitTrait.
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

Bottom Section

Notes

Bottom Section