{"name":"lifeState","operator":null,"title":"lifeState","type":"command","url":"https://community.bistudio.com/wiki/lifeState","revid":329358,"updated":"2022-07-27T12:23:13Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns the life state of the given unit.\n\n| Arma 2 | Arma 3 |\n|---|---|\n| - \"ALIVE\"<br>- \"DEAD\"<br>- \"DEAD-RESPAWN\"<br>- \"DEAD-SWITCHING\"<br>- \"ASLEEP\"<br>- \"UNCONSCIOUS\" | - \"HEALTHY\"<br>- \"DEAD\"<br>- \"DEAD-RESPAWN\"<br>- \"DEAD-SWITCHING\"<br>- \"INCAPACITATED\"<br>- \"INJURED\" |\n\n> [!NOTE]\n> **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]). When the state is \"INCAPACITATED\", a sub-state is available via incapacitatedState command.","syntaxes":[{"syntax":"lifeState unit","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"String","types":["String"],"description":null,"text":"String"},"form":"unary","operator":null,"left":null,"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\nprivate _lifeState = lifeState player;\n```","code":["private _lifeState = lifeState player;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setUnconscious","incapacitatedState"],"notes":[],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}