getHitPointDamage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<!-- Note Section [A-Z]+ --> " to "")
m (Text replacement - " |r1=[[" to " |r1= [[")
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| TKOH
|game1= tkoh
|1.00
|version1= 1.00
 
|game2= arma3
|version2= 0.50
 
|arg= global
|arg= global


|gr1= Object Manipulation
|gr1= Object Manipulation


| 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]].
|descr= Return current level of damage in range 0..1 for a specific Hit Point (specified by its config class).
* 0: no damage
If you need to get damage of a selection instead of hit point, use [[getHit]].
* 1: full damage


| vehicle '''getHitPointDamage''' hitPointName
|s1= vehicle [[getHitPointDamage]] hitPointName


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


| [[Number]] (or, prior to Arma 3 v1.94, [[Nothing]] when invalid input is given)
|r1= [[Number]] (or, prior to Arma 3 v1.94, [[Nothing]] when invalid input is given)


|x1= <code>[[vehicle]] [[player]] [[getHitPointDamage]] "hitEngine";</code>
|x1= <code>[[vehicle]] [[player]] [[getHitPointDamage]] "hitEngine";</code>
Line 23: Line 26:
}}
}}
<dl class="command_description">
<dl class="command_description">
<dt class="note">'''Unknown'''</dt>
 
<dt></dt>
<dd class="notedate">Posted on November 25, 2011 - 15:06 (UTC)</dd>
<dt class="note">[[User:Joris|Joris]]</dt>
<dd class="note">
<dd class="note">
Common [[ObjectRTD]] [[:Category:{{tkoh}}|{{tkoh}}]] Hit Points:
Common [[ObjectRTD]] [[:Category:{{tkoh}}|{{tkoh}}]] Hit Points:
{{Columns|4|
* HitEngine (engine #1)
* HitEngine (engine #1)
* HitEngine2 (engine #2)
* HitEngine2 (engine #2)
Line 57: Line 64:
* HitGlass5
* HitGlass5
* HitGlass6
* HitGlass6
</dl>
}}
</dd>


{{GameCategory|tkoh|Scripting Commands}}
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
<!-- CONTINUE Notes -->
<dl class="command_description">
<dt></dt>
<dt></dt>
<dd class="notedate">Posted on March 4, 2017 - 01:29 (UTC)</dd>
<dd class="notedate">Posted on March 4, 2017 - 01:29 (UTC)</dd>
Line 71: Line 73:
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.  
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>
</dd>
<dt><dt>
<dt><dt>
<dd class="notedate">Posted on October 5, 2018 - 23:12 (UTC)</dd>
<dd class="notedate">Posted on October 5, 2018 - 23:12 (UTC)</dd>
Line 77: Line 80:
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).  
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>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 00:46, 8 August 2021

Hover & click on the images for description

Description

Description:
Return current level of damage in range 0..1 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.
Groups:
Object Manipulation

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.94, 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
Posted on November 25, 2011 - 15:06 (UTC)
Joris
Common ObjectRTD Take On Helicopters 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
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).