getDammage: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|= Game name" to "|Game name=") |
Lou Montana (talk | contribs) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|Returns the object damage in the range from 0 to 1. Alias of [[damage]]. | | Returns the object damage in the range from 0 to 1. Alias of [[damage]]. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[getDammage]] object |SYNTAX= | ||
|p1 = object: [[Object]] | |p1 = object: [[Object]] | ||
| [[Number]] |RETURNVALUE= | | [[Number]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1 = <code>_damage = [[getDammage]] [[player]];</code> | |||
|x1 = <code>[[private]] _damage = [[getDammage]] [[player]];</code> | |||
| [[damage]], [[setDamage]], [[setDammage]], [[setHit]], [[getHit]], [[getHitIndex]], [[setHitIndex]], [[getHitPointDamage]], [[setHitPointDamage]] |SEEALSO= | | [[damage]], [[setDamage]], [[setDammage]], [[setHit]], [[getHit]], [[getHitIndex]], [[setHitIndex]], [[getHitPointDamage]], [[setHitPointDamage]] |SEEALSO= | ||
}} | }} | ||
Line 23: | Line 26: | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on | <dd class="notedate">Posted on May 9, 2011 - 13:10 (CEST) | ||
<dt class="note">[[User:Demonized|Demonized]] <dd class="note"> | <dt class="note">[[User:Demonized|Demonized]] | ||
getDammage and damage | <dd class="note"> | ||
[[getDammage]] and [[damage]] work fine when used on damaged vehicles after a repair from a repairtruck when used in A2 CO patch 1.59. | |||
<dd class="notedate">Posted on January 31, 2007 - 04:25 (CEST) | |||
<dt class="note">[[User:Ceeeb|Ceeeb]] | |||
<dd class="note"> | |||
In '''OFP 1.96''', it is possible for a unit to be dead and still return a getDammage value well below 1. Use ![[alive]] to check if a unit is dead. | |||
<dt class="note"> | <dd class="notedate">Posted on 13 August 13, 2006 - 12:29 (CEST) | ||
<dt class="note">[[User:UNN|UNN]] | |||
<dd class="note"> | |||
'''In OFP''' vehicles repaired in game with the Repair trucks e.t.c never get completely repaired. After being repaired, rather than returning 0 when the [[damage]] command is called. They return a value equal to or less than 0.09. | |||
Consequently any vehicle flagged as immobile (as indicated by the [[canMove]] command), remains so. At least as far as the AI are concerned. The AI will refuse to board an immobile vehicle or eject straight after boarding. Players remain unaffected and can drive the vehicle as normal. To circumvent this, use [[setDamage]] 0 on the vehicle in question, to allow the AI to board. | Consequently any vehicle flagged as immobile (as indicated by the [[canMove]] command), remains so. At least as far as the AI are concerned. The AI will refuse to board an immobile vehicle or eject straight after boarding. Players remain unaffected and can drive the vehicle as normal. To circumvent this, use [[setDamage]] 0 on the vehicle in question, to allow the AI to board. | ||
<!-- Note Section END --> | <!-- Note Section END --> | ||
Line 43: | Line 47: | ||
<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.46|{{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 ArmA|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands ArmA | |||
[[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}}}}]] | ||
[[Category: | [[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | ||
[[Category: | [[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]] |
Revision as of 22:15, 19 November 2019
Description
- Description:
- Returns the object damage in the range from 0 to 1. Alias of damage.
- Groups:
- Uncategorised
Syntax
- Syntax:
- getDammage object
- Parameters:
- object: Object
- Return Value:
- Number
Examples
- Example 1:
private _damage = getDammage player;
Additional Information
- See also:
- damagesetDamagesetDammagesetHitgetHitgetHitIndexsetHitIndexgetHitPointDamagesetHitPointDamage
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
- Posted on May 9, 2011 - 13:10 (CEST)
- Demonized
- getDammage and damage work fine when used on damaged vehicles after a repair from a repairtruck when used in A2 CO patch 1.59.
- Posted on January 31, 2007 - 04:25 (CEST)
- Ceeeb
- In OFP 1.96, it is possible for a unit to be dead and still return a getDammage value well below 1. Use !alive to check if a unit is dead.
- Posted on 13 August 13, 2006 - 12:29 (CEST)
- UNN
- In OFP vehicles repaired in game with the Repair trucks e.t.c never get completely repaired. After being repaired, rather than returning 0 when the damage command is called. They return a value equal to or less than 0.09. Consequently any vehicle flagged as immobile (as indicated by the canMove command), remains so. At least as far as the AI are concerned. The AI will refuse to board an immobile vehicle or eject straight after boarding. Players remain unaffected and can drive the vehicle as normal. To circumvent this, use setDamage 0 on the vehicle in question, to allow the AI to board.
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.46
- 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 Information