alive: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Bot: Replacing category Scripting Commands Arma 3 with Arma 3: Scripting Commands)
Line 33: Line 33:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|ALIVE]]
[[Category:Scripting Commands OFP 1.99|ALIVE]]
[[Category:Scripting Commands OFP 1.96|ALIVE]]
[[Category:Scripting Commands OFP 1.46|ALIVE]]
[[Category:Scripting Commands ArmA|ALIVE]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Notes: Improper Formatting|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
Line 54: Line 42:
</dl>
</dl>
<!-- DISCONTINUE Notes -->
<!-- DISCONTINUE Notes -->
[[Category:Scripting Commands|ALIVE]]
[[Category:Scripting Commands OFP 1.99|ALIVE]]
[[Category:Scripting Commands OFP 1.96|ALIVE]]
[[Category:Scripting Commands OFP 1.46|ALIVE]]
[[Category:Scripting Commands ArmA|ALIVE]]
[[Category:Command Group: Object Information|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Arma 3: Scripting Commands]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Notes: Improper Formatting|{{uc:{{PAGENAME}}}}]]

Revision as of 17:30, 3 December 2018

Hover & click on the images for description

Description

Description:
Check if given vehicle/person/building is alive (i.e. not dead or destroyed). alive objNull returns false.
Groups:
Uncategorised

Syntax

Syntax:
alive object
Parameters:
object: Object to test
Return Value:
Boolean: true when alive, false when dead

Examples

Example 1:
SQS: ?!(alive player) : exit
Example 2:
SQF: if (!alive player) exitWith {};

Additional Information

See also:
setDamagedamage

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

Posted on October 19, 2015 - 23:48 (UTC)
Pierre MGI
Alive or not could be the question! in multi-player, missions come with respawn module(s). When a player is dead shot, (alive player) will return false, then almost immediately true if the "revive" respawn template is enabled, then could turn on false if time for assistance is elapsed or if the player activates the respawn menu before; and finally true after player respawns. Just be aware that in that case (respawn + revive enabled), the status of the player is toggling: true false true false true. Then, alive status while player is waiting for being rescued could lead to some error scripts as player is supposed to be alive but in limbo and the dead entity "player" passed to server.