Difference between revisions of "getFatigue"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
 
{{Command|Comments=
 
{{Command|Comments=
____________________________________________________________________________________________
 
  
 
| arma3 |Game name=
 
| arma3 |Game name=
Line 7: Line 6:
  
 
|gr1= Stamina System |GROUP1=
 
|gr1= Stamina System |GROUP1=
____________________________________________________________________________________________
 
  
 
| Returns fatigue of given unit.  |DESCRIPTION=
 
| Returns fatigue of given unit.  |DESCRIPTION=
____________________________________________________________________________________________
 
  
 
| '''getFatigue''' unit |SYNTAX=
 
| '''getFatigue''' unit |SYNTAX=
Line 25: Line 22:
 
</code>|EXAMPLE2=  
 
</code>|EXAMPLE2=  
  
____________________________________________________________________________________________
 
  
 
| [[setFatigue]], [[enableFatigue]], [[getStamina]] |SEEALSO=  
 
| [[setFatigue]], [[enableFatigue]], [[getStamina]] |SEEALSO=  
  
 
|  |MPBEHAVIOUR=  
 
|  |MPBEHAVIOUR=  
____________________________________________________________________________________________
 
 
}}
 
}}
  

Revision as of 02:18, 17 January 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

Notes

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.

Bottom Section