setDamage: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (alt syntax) |
m (template:command argument fix) |
||
Line 12: | Line 12: | ||
| Damage / repair object. Damage 0 means fully functional, damage 1 means completely destroyed / dead. (This function is an alias of [[setDammage]] and was introduced to fix the obvious spelling error in the original function name)<br><br> | | Damage / repair object. Damage 0 means fully functional, damage 1 means completely destroyed / dead. (This function is an alias of [[setDammage]] and was introduced to fix the obvious spelling error in the original function name)<br><br> | ||
Since Arma 3 v1.67 there is an alternative syntax to this command allowing to switch off destruction effects. |= | Since Arma 3 v1.67 there is an alternative syntax to this command allowing to switch off destruction effects. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| object '''setDamage''' damage |= | | object '''setDamage''' damage |SYNTAX= | ||
|p1= object: [[Object]] |= | |p1= object: [[Object]] |PARAMETER1= | ||
|p2= damage: [[Number]] |= | |p2= damage: [[Number]] |PARAMETER2= | ||
| [[Nothing]] |= | | [[Nothing]] |RETURNVALUE= | ||
|s2= object '''setDamage''' [damage, useEffects] ''Since Arma 3 v1.67''|= | |s2= object '''setDamage''' [damage, useEffects] ''Since Arma 3 v1.67''|SYNTAX= | ||
|p21= object: [[Object]] |= | |p21= object: [[Object]] |PARAMETER2=1 | ||
|p22= [damage, useEffects]: [[Array]] |= | |p22= [damage, useEffects]: [[Array]] |PARAMETER2=2 | ||
|p23= damage: [[Number]] |= | |p23= damage: [[Number]] |PARAMETER2=3 | ||
|p24= useEffects: [[Boolean]] - [[false]] to skip destruction effects. Default: [[true]] |= | |p24= useEffects: [[Boolean]] - [[false]] to skip destruction effects. Default: [[true]] |PARAMETER2=4 | ||
|r2= [[Nothing]] |= | |r2= [[Nothing]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>_soldier1 [[setDamage]] 1;</code> |= | |x1= <code>_soldier1 [[setDamage]] 1;</code> |EXAMPLE1= | ||
|x2= <code>_house1 [[setDamage]] [1, [[false]]];</code> |= | |x2= <code>_house1 [[setDamage]] [1, [[false]]];</code> |EXAMPLE2= | ||
___________________________________________________________________________________________ | ___________________________________________________________________________________________ | ||
| [[setDammage]], [[setVehicleArmor]], [[damage]], [[getDammage]], [[setHit]], [[getHit]], [[getHitIndex]], [[setHitIndex]], [[getHitPointDamage]], [[setHitPointDamage]] |= | | [[setDammage]], [[setVehicleArmor]], [[damage]], [[getDammage]], [[setHit]], [[getHit]], [[getHitIndex]], [[setHitIndex]], [[getHitPointDamage]], [[setHitPointDamage]] |SEEALSO= | ||
}} | }} |
Revision as of 14:46, 7 April 2019
Description
- Description:
- Damage / repair object. Damage 0 means fully functional, damage 1 means completely destroyed / dead. (This function is an alias of setDammage and was introduced to fix the obvious spelling error in the original function name)
Since Arma 3 v1.67 there is an alternative syntax to this command allowing to switch off destruction effects. - 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.99
- Scripting Commands OFP 1.96
- Scripting Commands ArmA
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters
- Command Group: Object Manipulation
- Notes: Improper Formatting