alive: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("serv...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| ofp | | ofp | ||
|1.00 | |1.00 | ||
|arg= global |Multiplayer Arguments= | |arg= global |Multiplayer Arguments= | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
| Check if given vehicle/person/building is alive (i.e. not dead or destroyed). | | Check if given vehicle/person/building is alive (i.e. not dead or destroyed). | ||
{{Informative | {{Inline code|[[alive]] [[objNull]] {{cc|returns [[false]]}}}}}} | {{Informative | {{Inline code|[[alive]] [[objNull]] {{cc|returns [[false]]}}}}}} | ||
| [[alive]] object | | [[alive]] object | ||
|p1= object: [[Object]] to test | |p1= object: [[Object]] to test | ||
| [[Boolean]] - [[true]] if alive, [[false]] if dead/completely destroyed | | [[Boolean]] - [[true]] if alive, [[false]] if dead/completely destroyed | ||
|x1= SQS: <code>?!([[alive]] [[player]]) : [[exit]]</code> | |x1= SQS: <code>?!([[alive]] [[player]]) : [[exit]]</code> | ||
|x2= SQF: <code>[[if]] (![[alive]] [[player]]) [[exitWith]] {};</code> | |x2= SQF: <code>[[if]] (![[alive]] [[player]]) [[exitWith]] {};</code> | ||
| [[setDamage]], [[damage]] | | [[setDamage]], [[damage]] | ||
}} | }} | ||
Revision as of 00:01, 18 January 2021
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 to test
- Return Value:
- Boolean - true if alive, false if dead/completely destroyed
Examples
Additional Information
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
- 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.
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Object Manipulation
- Scripting Commands OFP 1.46
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.99
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands