damage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 19: Line 19:
The returned number is in range 0 (healthy) to 1 (dead). |= Return value
The returned number is in range 0 (healthy) to 1 (dead). |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
 
 
|x1= <pre>? ((damage player)>0.1) : player groupChat "I'm hurt! Medic!"</pre> |= Example 1
|x1= <pre>? ((damage player)>0.1) : player groupChat "I'm hurt! Medic!"</pre> |= Example 1
|x2= <pre>
if ((damage player) > 0.1) then
{
    player groupChat "I'm hurt! Medic!";
};</pre> |= Example 2
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 13:19, 25 December 2014

Hover & click on the images for description

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:

if ((damage player) > 0.1) then {

   player groupChat "I'm hurt! Medic!"; 
};

Additional Information

See also:
setDamagesetDammagegetDammagesetHit

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