getUnitTrait: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
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|Comments=
{{Command
|arma3|Game name=
|arma3
|1.58|Game version=
|1.58
|arg= global |MParg=
|arg= global |MParg=


|gr1= Object Manipulation |GROUP1=
|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]].}} |DESCRIPTION=
{{Informative | For the default values please visit [[setUnitTrait]].}}


|unit [[getUnitTrait]] skillName |SYNTAX=
|unit [[getUnitTrait]] skillName
|p1= Unit: [[Object]] |PARAMETER1=
|p1= Unit: [[Object]]
|p2= skillName: [[String]] - Name of the skill |PARAMETER2=
|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 |RETURNVALUE=
* [[Nothing]] - if ''unit'' is invalid, e.g an empty vehicle
|x1= <code>[[player]] [[getUnitTrait]] "Medic";</code>|EXAMPLE1=
|x1= <code>[[player]] [[getUnitTrait]] "Medic";</code>
| [[setUnitTrait]], [[getAllUnitTraits]] |SEEALSO=
| [[setUnitTrait]], [[getAllUnitTraits]]
|  |MPBEHAVIOUR=
|  |MPBEHAVIOUR=
}}
}}

Revision as of 01:42, 18 January 2021

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:
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

Bottom Section

Notes

Bottom Section