lifeState: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:ArmA 2: New Scripting Commands List\|{{uc:{{PAGENAME}}}}\]\]\s*" to "")
(Fix description)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns the life state of the given unit. Can be one of:<br>
| Returns the life state of the given unit.
<br>
{{{!}}
'''(Pre-Arma 3)'''
! {{arma2}}
*"ALIVE"
! {{arma3}}
*"DEAD"
{{!}}-
*"DEAD-RESPAWN"
{{!}}
*"DEAD-SWITCHING"
* "ALIVE"
*"ASLEEP"
* "DEAD"
*"UNCONSCIOUS"
* "DEAD-RESPAWN"
<br>
* "DEAD-SWITCHING"
'''(Arma 3)'''
* "ASLEEP"
*"HEALTHY"
* "UNCONSCIOUS"
*"DEAD"
{{!}}
*"DEAD-RESPAWN"
* "HEALTHY"
*"DEAD-SWITCHING"
* "DEAD"
*"INCAPACITATED"
* "DEAD-RESPAWN"
*"INJURED"
* "DEAD-SWITCHING"
<br>
* "INCAPACITATED"
In Arma 3 [[lifeState]] seems to change to "INJURED" when [[damage]] aliveUnit <nowiki>>=</nowiki> 0.1 (0.1 seems to be the value defined in config under "InjuredTreshold"). |DESCRIPTION=
* "INJURED"
{{!}}}


{{Feature arma3 | In {{arma3}}, [[lifeState]] seems to change to "INJURED" when {{Inline code | [[damage]] aliveUnit >{{=}} 0.1}} (0.1 seeming to be the value defined in config under {{sic|"InjuredTreshold"}}).}} |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''lifeState''' unit |SYNTAX=
| [[lifeState]] unit |SYNTAX=


|p1= unit: [[Object]] |PARAMETER1=  
|p1= unit: [[Object]] |PARAMETER1=  
|p2= |PARAMETER2=
|p3= |PARAMETER3=


| [[String]] |RETURNVALUE=  
| [[String]] |RETURNVALUE=  


 
|x1= <code>[[private]] _lifeState = [[lifeState]] [[player]];</code> |EXAMPLE1=
|x1= <code>_ls = [[lifeState]] loon;</code> |EXAMPLE1=  
 
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[setUnconscious]] |SEEALSO=  
| [[setUnconscious]] |SEEALSO=


|  |MPBEHAVIOUR=  
|  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}



Revision as of 01:12, 24 December 2019

Hover & click on the images for description

Description

Description:
Returns the life state of the given unit.
Arma 2 Arma 3
  • "ALIVE"
  • "DEAD"
  • "DEAD-RESPAWN"
  • "DEAD-SWITCHING"
  • "ASLEEP"
  • "UNCONSCIOUS"
  • "HEALTHY"
  • "DEAD"
  • "DEAD-RESPAWN"
  • "DEAD-SWITCHING"
  • "INCAPACITATED"
  • "INJURED"
Arma 3
In Arma 3, lifeState seems to change to "INJURED" when damage aliveUnit >= 0.1 (0.1 seeming to be the value defined in config under "InjuredTreshold"sic).
Groups:
Uncategorised

Syntax

Syntax:
lifeState unit
Parameters:
unit: Object
Return Value:
String

Examples

Example 1:
private _lifeState = lifeState player;

Additional Information

See also:
setUnconscious

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

Bottom Section