getUnitTrait: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Command|= Comments |arma3|= Game name |1.58|= Game version | Gets the current value of a trait of the given unit.|= Description |unit '''setUnitTrait''' skill_name |= Syntax...") |
m (template:command argument fix) |
||
(10 intermediate revisions by 7 users not shown) | |||
Line 2: | Line 2: | ||
|arma3|= Game name | |arma3|= Game name | ||
|1.58|= Game version | |1.58|= Game version | ||
| Gets the current value of a trait of the given unit.|= | |arg= global |= | ||
|unit ''' | | Gets the current value of a trait of the given unit. | ||
|p1= Unit: [[Object]] |= | <br /><br /> | ||
|p2= | For the default values please visit [[setUnitTrait]]. | ||
| [[Bool]] or [[Scalar]] - Value of the trait |= | |||
|x1= <code>player getUnitTrait "Medic";</code>|= | |DESCRIPTION= | ||
| [[setUnitTrait]]|= | |unit '''getUnitTrait''' skillName |SYNTAX= | ||
| |= | |p1= Unit: [[Object]] |PARAMETER1= | ||
|p2= skillName: [[String]] - Name of the skill |PARAMETER1= | |||
| [[Bool]] or [[Scalar]] - Value of the trait <br/> [[Nothing]] if unit is empty vehicle |RETURNVALUE= | |||
|x1= <code>[[player]] [[getUnitTrait]] "Medic";</code>|EXAMPLE1= | |||
| [[setUnitTrait]]|SEEALSO= | |||
| |MPBEHAVIOUR= | |||
}} | }} | ||
Revision as of 14:40, 7 April 2019
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:
- Bool or Scalar - Value of the trait
Nothing if unit is empty vehicle
Examples
- Example 1:
player getUnitTrait "Medic";
Additional Information
- See also:
- setUnitTrait
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