damage

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Operation Flashpoint version 1.5
  Arguments of this scripting command don't have to be local to the client the command is executed on

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint
Version:
1.5

Description

Description:
Return the damage value of an object.

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:
if ((damage player) > 0.1) then { player groupChat "I'm hurt! Medic!"; };

Additional Information

Multiplayer:
-
See also:
setDamagesetDammagegetDammagesetHitgetHitgetHitIndexsetHitIndexgetHitPointDamagesetHitPointDamage

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

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.