damage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|DAMAGE]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|DAMAGE]]
____________________________________________________________________________________________
[[Category:Scripting Commands ArmA|DAMAGE]]


| ofpr |= Game name


<h2 style="color:#000066">'''damage ''anything'''''</h2>
|1.5|= Game version


|arg= global |= Arguments in MP
____________________________________________________________________________________________


'''Operand types:'''
| Return the damage value of an object. |= Description
____________________________________________________________________________________________


'''object:''' [[Object]]
| '''damage''' object |= Syntax


'''Type of returned value:'''
|p1= object: [[Object]] |= Parameter 1


[[Number]]
| [[Number]]
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
____________________________________________________________________________________________


'''Compatibility:'''
| [[setDamage]] |= See also


Added in version '''1.50'''
}}


'''Description:'''
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


Object damage in range 0 to 1.
<!-- Note Section END -->
</dl>


'''Note:''' This function is identical to [[getDammage]].
<h3 style="display:none">Bottom Section</h3>


 
[[Category:Scripting Commands|DAMAGE]]
'''Example:'''
[[Category:Scripting Commands OFP 1.96|DAMAGE]]
 
[[Category:Scripting Commands ArmA|DAMAGE]]
? (('''damage''' [[player]]) > 0.3) : [[hint]] "Ouch!!"

Revision as of 00:40, 2 August 2006

Hover & click on the images for description

Description

Description:
Return the damage value of an object.
Groups:
Uncategorised

Syntax

Syntax:
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!"

Additional Information

See also:
setDamage

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