damage: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|= Game name" to "|Game name=") |
Lou Montana (talk | contribs) m (Text replacement - "|= Game version" to "|Game version=") |
||
Line 4: | Line 4: | ||
| ofp |Game name= | | ofp |Game name= | ||
|1.5| | |1.5|Game version= | ||
|arg= global |Multiplayer Arguments= | |arg= global |Multiplayer Arguments= |
Revision as of 12:38, 31 August 2019
Description
- Description:
- Return the damage value of an object.
- Groups:
- Uncategorised
Syntax
- Syntax:
- Number = damage object
- Parameters:
- object: Object
- Return Value:
- Number - The returned number is in range 0 (healthy) to 1 (dead).
Examples
- Example 1:
? ((damage player)>0.1) : player groupChat "I'm hurt! Medic!"
- Example 2:
_health = (1 - damage player) * 100 //Health in % from 0 to 100
Additional Information
- See also:
- setDamagesetDammagegetDammagesetHitgetHitgetHitIndexsetHitIndexgetHitPointDamagesetHitPointDamage
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 February 13, 2015 - 20:20 (UTC)
- Pierre MGI
- The returned value depends on the couple target/ammo fired. This value has no correlation with the sum of all hitpoints damage status and the effective status of the object. Firing bullets on cars often lead to weird results. For example: damage returns zero while a Hunter is fired at will with an .50 HMG! Hunter can be almost destroyed with zero damage for this function. If you script, use instead the getHitPointDamage function.
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.5
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.99
- Scripting Commands OFP 1.96
- Scripting Commands ArmA
- Command Group: Object Information
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters