getHitPointDamage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands]]
[[Category:Scripting Commands]]


{{Command|= Comments
{{Command|Comments=
____________________________________________________________________________________________
____________________________________________________________________________________________


| TKOH |= Game name
| TKOH |Game name=
 
|1.00|Game version=
|1.00|= Game version
|arg= global|Multiplayer Arguments=
____________________________________________________________________________________________
____________________________________________________________________________________________


| Return current level of damage for a specific Hit Point (specified by its config class).
| Return current level of damage for a specific Hit Point (specified by its config class). If you need to get damage of a selection instead of hit point, use [[getHit]].
* 0: no damage
* 0: no damage
* 1: full damage |= Description
* 1: full damage |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| vehicle '''getHitPointDamage''' hitPointName|= Syntax
| vehicle '''getHitPointDamage''' hitPointName|SYNTAX=


|p1= vehicle : [[Object]] - vehicle to be queried |= Parameter 1
|p1= vehicle : [[Object]] - vehicle to be queried |PARAMETER1=
|p2= hitPointName: [[String]] - name of the Hit Point class |= Parameter 2
|p2= hitPointName: [[String]] - name of the Hit Point class |PARAMETER2=


| [[Number]] |= Return value
| [[Number]] (or, prior to Arma 3 v1.93.145625, [[Nothing]] when invalid input is given) |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>(vehicle player) getHitPointDamage "hitEngine";</code> |=
|x1= <code>[[vehicle]] [[player]] [[getHitPointDamage]] "hitEngine";</code> |=


| [[setHitPointDamage]] |= See also
| [[setHitPointDamage]], [[getAllHitPointsDamage]], [[setHit]], [[getHit]], [[setDamage]], [[damage]], [[getHitIndex]], [[setHitIndex]] |SEEALSO=


}}
}}
<h3 style="display:none">Notes</h3>
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dt class="note">'''Unknown'''
<dd class="note">
Common [[ObjectRTD]] [[:Category:Take_On|TKOH]] Hit Points:
Common [[ObjectRTD]] [[:Category:Take_On|TKOH]] Hit Points:
* HitEngine (engine #1)
* HitEngine (engine #1)
Line 71: Line 72:
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on March 4, 2017 - 01:29 (UTC)</dd>
<dt class="note">[[User:K.J.|K.J.]]</dt>
<dd class="note">
Note that vehicles with multiple turrets have multiple HitTurret and HitGun classes that can't be distinguished based on the Hitpoint class name. They can only be distinguished by their selection names. The selection names do not necessarily correspond to a common nomenclature, especially for mod vehicles. There can also be multiple empty Hitpoint Class names on a vehicle or infantry unit. They can be hitpoints for vehicle headlights or be the result of a bad config/model, as hitpoints that have an undefined named selection in their config class or are missing their named selection in the model will result in an empty HitPoint class name.
</dd>
</dl>
<!-- DISCONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on October 5, 2018 - 23:12 (UTC)</dd>
<dt class="note">[[User:x3kj|x3kj]]</dt>
<dd class="note">
Note: Since Arma 3 Tank DLC, Turrets of vanilla vehicles no longer have identical Hitpoint Classes for multiple Turrets. Mod vehicles may still have the old issue, but they produces error messages in RPT if they still do (and thus should be enough motivation to fix them).
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 23:01, 31 August 2019


Hover & click on the images for description

Description

Description:
Return current level of damage for a specific Hit Point (specified by its config class). If you need to get damage of a selection instead of hit point, use getHit.
  • 0: no damage
  • 1: full damage
Groups:
Uncategorised

Syntax

Syntax:
vehicle getHitPointDamage hitPointName
Parameters:
vehicle : Object - vehicle to be queried
hitPointName: String - name of the Hit Point class
Return Value:
Number (or, prior to Arma 3 v1.93.145625, Nothing when invalid input is given)

Examples

Example 1:
vehicle player getHitPointDamage "hitEngine";

Additional Information

See also:
setHitPointDamagegetAllHitPointsDamagesetHitgetHitsetDamagedamagegetHitIndexsetHitIndex

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

Unknown
Common ObjectRTD TKOH Hit Points:
  • HitEngine (engine #1)
  • HitEngine2 (engine #2)
  • HitEngine3 (engine #3)
  • HitHRotor (main rotor)
  • HitVRotor (tail rotor)
  • HitBatteries (electrical systems)
  • HitLight (landing light)
  • HitHydraulics (entire hydraulics system)
  • HitTransmission (engine transmission)
  • HitGear (landing gear)
  • HitFuel (all fuel tanks)
  • HitHStabilizerL1 (first left horizontal stabilizer)
  • HitHStabilizerR1 (first right horizontal stabilizer)
  • HitVStabilizer1 (first vertical stabilizer)
  • HitTail (tail boom)
  • HitPitotTube (all pitot tubes)
  • HitStaticPort (all static ports)
  • HitStarter1 (starter for engine #1)
  • HitStarter2 (starter for engine #2)
  • HitStarter3 (starter for engine #3)
  • HitAvionics
  • HitHull
  • HitMissiles
  • HitRGlass
  • HitLGlass
  • HitGlass1
  • HitGlass2
  • HitGlass3
  • HitGlass4
  • HitGlass5
  • HitGlass6

Bottom Section

Posted on March 4, 2017 - 01:29 (UTC)
K.J.
Note that vehicles with multiple turrets have multiple HitTurret and HitGun classes that can't be distinguished based on the Hitpoint class name. They can only be distinguished by their selection names. The selection names do not necessarily correspond to a common nomenclature, especially for mod vehicles. There can also be multiple empty Hitpoint Class names on a vehicle or infantry unit. They can be hitpoints for vehicle headlights or be the result of a bad config/model, as hitpoints that have an undefined named selection in their config class or are missing their named selection in the model will result in an empty HitPoint class name.
Posted on October 5, 2018 - 23:12 (UTC)
x3kj
Note: Since Arma 3 Tank DLC, Turrets of vanilla vehicles no longer have identical Hitpoint Classes for multiple Turrets. Mod vehicles may still have the old issue, but they produces error messages in RPT if they still do (and thus should be enough motivation to fix them).