Difference between revisions of "getFatigue"
Jump to navigation
Jump to search
m (removed empty line from note) |
Lou Montana (talk | contribs) m (Text replacement - "{{Command " to "{{RV|type=command ") |
||
(18 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{RV|type=command |
− | |||
− | | arma3 | + | | arma3 |
− | |0.50 | + | |0.50 |
− | |arg= global | + | |arg= global |
− | |||
− | | | + | |gr1= Stamina System |
− | |||
− | | | + | | Returns fatigue of given unit. |
− | | | + | | '''getFatigue''' unit |
− | | [[ | + | |p1= unit: [[Object]] |
+ | | [[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]] | ||
− | |||
− | |||
− | |||
}} | }} | ||
− | |||
<dl class='command_description'> | <dl class='command_description'> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
− | <dt class="note"> | + | <dt class="note">[[User:Killzone_Kid|Killzone_Kid]]<dd class="note"> |
[[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> | [[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> | ||
Line 41: | Line 33: | ||
</dl> | </dl> | ||
− | + | {{GameCategory|arma3|New Scripting Commands}} | |
− | + | {{GameCategory|arma3|Scripting Commands}} | |
− | |||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
− |
Latest revision as of 01:55, 23 January 2021
Hover & click on the images for descriptions
Description
- Description:
- Returns fatigue of given unit.
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
- Groups:
- Stamina System
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.