setDamage: Difference between revisions

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


| ofpr |= Game name


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


| Damage / repair object. Damages or repairs the object. Damage 0 means fully functional, damage 1 means completely destroyed / dead. See also [[getDammage]]
Note: This function is identical to [[setDammage]]. It was introduced to fix a spelling error in original function name. Note: Setting a unit's damage to a negative value will set their health to full, but impair their aim. |= Description
____________________________________________________________________________________________


'''Operand types:'''
| object '''setDamage''' damage |= Syntax


'''object:''' [[Object]]
|p1= object: [[Object]] |= Parameter 1


'''damage:''' [[Number]]
|p2= damage: [[Number]] |= Parameter 2


'''Type of returned value:'''
| [[Nothing]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>soldier1 setDamage 1</pre> |= Example 1
____________________________________________________________________________________________


[[Nothing]]
|  |= See also


'''Compatibility:'''
}}


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


'''Description:'''
<!-- Note Section END -->
</dl>


'''Damage / repair object'''.
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|SETDAMAGE]]
Damages or repairs the object.
[[Category:Scripting Commands OFP 1.96|SETDAMAGE]]
 
[[Category:Scripting Commands ArmA|SETDAMAGE]]
Damage 0 means fully functional, damage 1 means completely destroyed / dead.
 
See also [[getDammage]]
 
 
'''Note:''' This function is identical to [[setDammage]].
 
It was introduced to fix a spelling error in original function name.
 
'''Note:''' Setting a unit's damage to a negative value will set their health to full, but impair their aim.
 
 
'''Example:<br>'''
 
soldier1 '''setDamage''' 1

Revision as of 00:09, 2 August 2006

Hover & click on the images for description

Description

Description:
Damage / repair object. Damages or repairs the object. Damage 0 means fully functional, damage 1 means completely destroyed / dead. See also getDammage Note: This function is identical to setDammage. It was introduced to fix a spelling error in original function name. Note: Setting a unit's damage to a negative value will set their health to full, but impair their aim.
Groups:
Uncategorised

Syntax

Syntax:
object setDamage damage
Parameters:
object: Object
damage: Number
Return Value:
Nothing

Examples

Example 1:
soldier1 setDamage 1

Additional Information

See also:
See also needed

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