setDamage: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
Lou Montana (talk | contribs) |
||
Line 6: | Line 6: | ||
|1.5|Game version= | |1.5|Game version= | ||
|eff= global|Multiplayer Effects= | |||
|arg= global|Multiplayer Arguments= | |arg= global|Multiplayer Arguments= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | Sets an object's damage value in the range 0..1, 0 meaning fully functional and 1 completely destroyed / dead.<br> | ||
The alternative syntax allows to switch off destruction effects.<br><br> | |||
Identical to [[setDammage]], typo aside. |DESCRIPTION= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| object | | object [[setDamage]] damage |SYNTAX= | ||
|p1= object: [[Object]] |PARAMETER1= | |p1= object: [[Object]] |PARAMETER1= | ||
|p2= damage: [[Number]] |PARAMETER2= | |p2= damage: [[Number]] |PARAMETER2= | ||
| [[Nothing]] |RETURNVALUE= | | [[Nothing]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | |||
|s2= object | |s2= object [[setDamage]] [damage, useEffects] (''Since Arma 3 v1.67'')|SYNTAX2= | ||
|p21= object: [[Object]] |PARAMETER21= | |p21= object: [[Object]] |PARAMETER21= | ||
|p22= [damage, useEffects]: [[Array]] | | |||
|p23= damage: [[Number]] | | |p22= [damage, useEffects]: [[Array]] |PARAMETER22= | ||
|p24= useEffects: [[Boolean]] - [[false]] to skip destruction effects. Default: [[true]] | | |||
|p23= damage: [[Number]] |PARAMETER23= | |||
|p24= useEffects: [[Boolean]] - [[false]] to skip destruction effects. Default: [[true]] |PARAMETER24= | |||
|r2= [[Nothing]] |RETURNVALUE2= | |r2= [[Nothing]] |RETURNVALUE2= | ||
Line 38: | Line 44: | ||
| [[setDammage]], [[setVehicleArmor]], [[damage]], [[getDammage]], [[setHit]], [[getHit]], [[getHitIndex]], [[setHitIndex]], [[getHitPointDamage]], [[setHitPointDamage]] |SEEALSO= | | [[setDammage]], [[setVehicleArmor]], [[damage]], [[getDammage]], [[setHit]], [[getHit]], [[getHitIndex]], [[setHitIndex]], [[getHitPointDamage]], [[setHitPointDamage]] |SEEALSO= | ||
}} | }} | ||
Line 44: | Line 49: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate"> | <dd class="notedate"> | ||
<dt class="note"> | <dt class="note">[[User:Ceeeb|Ceeeb]] | ||
<dd class="note">In '''OFP''', setting a unit's damage to a negative value will set it's health to full, but impair their aim. | <dd class="note">In '''OFP''', setting a unit's damage to a negative value will set it's health to full, but impair their aim. | ||
Line 55: | Line 58: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:Scripting Commands| | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands | [[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
Line 70: | Line 73: | ||
<dt class="note">[[User:KamikazeXeX|KamikazeXeX]]</dt> | <dt class="note">[[User:KamikazeXeX|KamikazeXeX]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
Using this possible overrides individual hit damages such as setHitPointDamage ["HitHead", _value]; if you're having issues try setting hitdamage after setdamage | Using this possible overrides individual hit damages such as [[setHitPointDamage]] ["HitHead", _value]; if you're having issues try setting hitdamage ''after'' setdamage. | ||
</dd> | </dd> | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> |
Revision as of 23:08, 4 September 2019
Description
- Description:
- Sets an object's damage value in the range 0..1, 0 meaning fully functional and 1 completely destroyed / dead.
The alternative syntax allows to switch off destruction effects.
Identical to setDammage, typo aside. - Groups:
- Uncategorised
Syntax
Alternative Syntax
- Syntax:
- object setDamage [damage, useEffects] (Since Arma 3 v1.67)
- Parameters:
- object: Object
- [damage, useEffects]: Array
- damage: Number
- useEffects: Boolean - false to skip destruction effects. Default: true
- Return Value:
- Nothing
Examples
Additional Information
- See also:
- setDammagesetVehicleArmordamagegetDammagesetHitgetHitgetHitIndexsetHitIndexgetHitPointDamagesetHitPointDamage
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
- Ceeeb
- In OFP, setting a unit's damage to a negative value will set it's health to full, but impair their aim.
Bottom Section
- Posted on May 29, 2015 - 11:23 (UTC)
- KamikazeXeX
- Using this possible overrides individual hit damages such as setHitPointDamage ["HitHead", _value]; if you're having issues try setting hitdamage after setdamage.
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.5
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands: Global Effect
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.99
- Scripting Commands ArmA
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters
- Command Group: Object Manipulation
- Notes: Improper Formatting