alive: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|game5= arma2oa |version5= 1.51 " to "|game5= arma2oa |version5= 1.50 ") |
Killzone Kid (talk | contribs) No edit summary |
||
(15 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
|game1= ofp | |game1= ofp | ||
|version1= 1.00 | |version1= 1.00 | ||
|game2= ofpe | |game2= ofpe | ||
|version2= 1.00 | |version2= 1.00 | ||
|game3= arma1 | |game3= arma1 | ||
|version3= 1.00 | |version3= 1.00 | ||
|game4= arma2 | |game4= arma2 | ||
|version4= 1.00 | |version4= 1.00 | ||
|game5= arma2oa | |game5= arma2oa | ||
|version5= 1.50 | |version5= 1.50 | ||
|game6= tkoh | |game6= tkoh | ||
|version6= 1.00 | |version6= 1.00 | ||
|game7= arma3 | |game7= arma3 | ||
|version7= 0.50 | |version7= 0.50 | ||
Line 34: | Line 27: | ||
|descr= Check if given vehicle/person/building is alive (i.e. not dead or destroyed). | |descr= Check if given vehicle/person/building is alive (i.e. not dead or destroyed). | ||
|s1= [[alive]] object | |s1= [[alive]] object | ||
Line 40: | Line 32: | ||
|p1= object: [[Object]] | |p1= object: [[Object]] | ||
|r1= [[Boolean]] - [[true | |r1= [[Boolean]] - [[true]] if alive, [[false]] if dead/destroyed | ||
| | |x1= SQS: | ||
<sqs>? not alive player : exit</sqs> | |||
|seealso= [[setDamage]] | |x2= SQF: | ||
<sqf>if (!alive player) exitWith {};</sqf> | |||
|x3= <sqf>alive objNull; // returns false</sqf> | |||
|seealso= [[setDamage]] [[damage]] [[waterDamaged]] | |||
}} | }} | ||
{{Note | |||
|user= Pierre MGI | |||
|timestamp= 20151019234800 | |||
|text= Alive or not could be the question! in multi-player, missions come with respawn module(s). When a player is dead shot, <sqf inline>alive player</sqf> will return false, then almost immediately true if the "revive" respawn template is enabled, then could turn to false again 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 script errors as player is supposed to be alive but is in limbo and the dead entity "player" gets passed to server. | |||
Alive or not could be the question! in multi-player, missions come with respawn module(s). When a player is dead shot, | }} | ||
Latest revision as of 16:50, 12 February 2023
Description
- Description:
- Check if given vehicle/person/building is alive (i.e. not dead or destroyed).
- Groups:
- Object Manipulation
Syntax
- Syntax:
- alive object
- Parameters:
- object: Object
- Return Value:
- Boolean - true if alive, false if dead/destroyed
Examples
- Example 1:
- SQS:
- Example 2:
- SQF:
- Example 3:
Additional Information
- See also:
- setDamage damage waterDamaged
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
- Posted on Oct 19, 2015 - 23:48 (UTC)
- 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 to false again 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 script errors as player is supposed to be alive but is in limbo and the dead entity "player" gets passed to server.
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Object Manipulation