getFatigue: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) 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 | {{Command | ||
| arma3 | | arma3 | ||
|0.50 | |0.50 | ||
|arg= global | |arg= global | ||
|gr1= Stamina System | |gr1= Stamina System | ||
| Returns fatigue of given unit. | | Returns fatigue of given unit. | ||
| '''getFatigue''' unit | | '''getFatigue''' unit | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
| [[Number]] | | [[Number]] | ||
|x1= <code> value = [[getFatigue]] [[player]]; | |x1= <code> value = [[getFatigue]] [[player]]; | ||
</code> | </code> | ||
|x2= <code> [[if]] ([[getFatigue]] [[player]] < 0.5) [[then]] { [[player]] [[sideChat]] "I'm good to go!" }; | |x2= <code> [[if]] ([[getFatigue]] [[player]] < 0.5) [[then]] { [[player]] [[sideChat]] "I'm good to go!" }; | ||
</code> | </code> | ||
| [[setFatigue]], [[enableFatigue]], [[getStamina]] | | [[setFatigue]], [[enableFatigue]], [[getStamina]] | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= |
Revision as of 00:35, 18 January 2021
Description
- Description:
- Returns fatigue of given unit.
- Groups:
- Stamina System
Syntax
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.