setUnitAbility: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Change setSkill_array reference to setSkill)
m (template:command argument fix)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Sets skill of given unit. Unlike [[setSkill]], [[setUnitAbility]] can set values > 1. Even though the [[skill]] command will correctly return set value, the actual unit ability will be capped to max available. |= Description
| Sets skill of given unit. Unlike [[setSkill]], [[setUnitAbility]] can set values > 1. Even though the [[skill]] command will correctly return set value, the actual unit ability will be capped to max available. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| unit [[setUnitAbility]] value |= Syntax
| unit [[setUnitAbility]] value |SYNTAX=


|p1= unit: [[Object]] |= Parameter 1
|p1= unit: [[Object]] |PARAMETER1=


|p2= value: [[Number]] |= Parameter 2
|p2= value: [[Number]] |PARAMETER2=


| [[Nothing]] |= Return value
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_unit [[setUnitAbility]] 1;</code> |= Example 1
|x1= <code>_unit [[setUnitAbility]] 1;</code> |EXAMPLE1=
|x2= <code>bob [[setUnitAbility]] -[[log]] 0;
|x2= <code>bob [[setUnitAbility]] -[[log]] 0;
[[hint]] [[str]] [[skill]] bob; //1.#INF</code> |= Example 1
[[hint]] [[str]] [[skill]] bob; //1.#INF</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[skill]], [[setSkill]], [[CfgAISkill]], [[ArmA: AI Combat Modes|AI Combat Modes]] |= See also
| [[skill]], [[setSkill]], [[CfgAISkill]], [[ArmA: AI Combat Modes|AI Combat Modes]] |SEEALSO=


}}
}}

Revision as of 14:48, 7 April 2019

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Sets skill of given unit. Unlike setSkill, setUnitAbility can set values > 1. Even though the skill command will correctly return set value, the actual unit ability will be capped to max available.
Groups:
Uncategorised

Syntax

Syntax:
unit setUnitAbility value
Parameters:
unit: Object
value: Number
Return Value:
Nothing

Examples

Example 1:
_unit setUnitAbility 1;
Example 2:
bob setUnitAbility -log 0; hint str skill bob; //1.#INF

Additional Information

See also:
skillsetSkillCfgAISkillAI Combat Modes

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

Notes

Bottom Section

Posted on October 8, 2014 - 09:20 (UTC)
Dwarden
AFAIK not used in Arma 3 anymore (or equals to setSkill)