getFatigue: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*) ([^ ]*)<\/code>" to "<code>$1$2$3 $4</code>")
m (Some wiki formatting)
 
(4 intermediate revisions by the same user not shown)
Line 15: Line 15:
|r1= [[Number]]
|r1= [[Number]]


|x1= <code>value = getFatigue player;
|x1= <sqf>if (getFatigue player < 0.5) then { player sideChat "I'm good to go!" };</sqf>
</code>
 
|x2= <code>if (getFatigue player < 0.5) then { player sideChat "I'm good to go!" };
</code>


|seealso= [[setFatigue]] [[enableFatigue]] [[getStamina]]
|seealso= [[setFatigue]] [[enableFatigue]] [[getStamina]]
}}
}}


<dl class="command_description">
{{Note
 
|user= Killzone_Kid
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt>
|timestamp= 20140405093000
<dd class="note">
|text= [[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.
[[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.<br>
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.
</dl>
}}

Latest revision as of 19:18, 7 April 2024

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:
if (getFatigue player < 0.5) then { player sideChat "I'm good to go!" };

Additional Information

See also:
setFatigue enableFatigue getStamina

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 - c
Posted on Apr 05, 2014 - 09:30 (UTC)
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.