getFatigue: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *arma3 * * *\| *([0-2]\.[0-9]{2}) * " to "|game1= arma3 |version1= $1 ")
m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ")
Line 9: Line 9:
|descr= Returns fatigue of given unit.
|descr= Returns fatigue of given unit.


|s1= '''getFatigue''' unit
|s1= '''getFatigue''' unit


|p1= unit: [[Object]]
|p1= unit: [[Object]]

Revision as of 23:11, 19 June 2021

Hover & click on the images for description

Description

Description:
Returns fatigue of given unit.
Groups:
Stamina System

Syntax

Syntax:
getFatigue unit
Parameters:
unit: Object
Return Value:
Number

Examples

Example 1:
value = getFatigue player;
Example 2:
if (getFatigue player < 0.5) then { player sideChat "I'm good to go!" };

Additional Information

See also:
setFatigueenableFatiguegetStamina

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
Killzone_Kid
getFatigue can be applied to remote unit however it will not read the changes made to unit's fatigue with setFatigue command. Only natural changes resulting from unit moving will be counted. When applied to local unit, it will read resulting value of natural fatigue combined with artificial changes added locally by setFatigue. In short, the server wouldn't know the correct value of remote unit's fatigue if you used setFatigue on the unit prior.