Difference between revisions of "getFatigue"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
(15 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Command|= Comments
+
{{Command|Comments=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| arma3 |= Game name
+
| arma3 |Game name=
 +
|0.50|Game version=
 +
|arg= global|Multiplayer Arguments=
 +
____________________________________________________________________________________________
  
|0.50|= Game version
+
| Returns fatigue of given unit. |DESCRIPTION=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| Returns fatigue of given unit|= Description
+
| '''getFatigue''' unit |SYNTAX=
____________________________________________________________________________________________
 
  
| '''getFatigue''' unit |= Syntax
+
|p1= unit: [[Object]]  |PARAMETER1=  
  
|p1= unit: [[Object]] |= PARAMETER1
+
| [[Number]] |RETURNVALUE=  
  
| [[Number]] |= RETURNVALUE
 
  
 +
|x1= <code> value = [[getFatigue]] [[player]];
 +
</code>|EXAMPLE1=
  
|x1= <code>
+
|x2= <code> [[if]] ([[getFatigue]] [[player]] < 0.5) [[then]] { [[player]] [[sideChat]] "I'm good to go!" };
</code>|= EXAMPLE1
+
</code>|EXAMPLE2=  
  
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| |= SEEALSO
+
| [[setFatigue]], [[enableFatigue]], [[getStamina]] |SEEALSO=  
  
|  |= MPBEHAVIOUR
+
|  |MPBEHAVIOUR=  
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
 
}}
 
}}
Line 31: Line 34:
 
<dl class='command_description'>
 
<dl class='command_description'>
 
<!-- Note Section BEGIN -->
 
<!-- Note Section BEGIN -->
 +
 +
<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>
  
 
<!-- Note Section END -->
 
<!-- Note Section END -->
Line 39: Line 45:
 
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]

Revision as of 23:32, 31 August 2019

Template:Command

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