getAllHitPointsDamage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (moving notes to talk)
m (hitpoints return structure update.)
Line 23: Line 23:
|x1= <code>[[getAllHitPointsDamage]] [[player]];
|x1= <code>[[getAllHitPointsDamage]] [[player]];
//[
//[
// ["HitFace","HitNeck","HitHead","HitPelvis","HitAbdomen","HitDiaphragm","HitChest","HitBody","HitArms","HitHands","HitLegs"],
//["hitface","hitneck","hithead","hitpelvis","hitabdomen","hitdiaphragm","hitchest","hitbody","hitarms","hithands","hitlegs","incapacitated"],
// ["","neck","head","pelvis","spine1","spine2","spine3","body","","hands","legs"],
//["face_hub","neck","head","pelvis","spine1","spine2","spine3","body","arms","hands","legs","body"],
// [0,0.0939002,0.0319932,0.0858595,0.174491,1,1,0.168495,1,0.5,0.195907]
//[0,0,0,0,0,0,0,0,0,0,0,0]
//]</code> |=
//]
</code> |=


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

Revision as of 09:45, 17 February 2019


Hover & click on the images for description

Description

Description:
Returns 3 arrays for easy cross reference: 1st - array of hit point names, 2nd - array of hit selection names, 3rd - array of damage values. All values in all arrays are ordered accordingly to hit part index for convenience and for use in setHitIndex and getHitIndex. Levels of damage are:
  • 0: no damage
  • 1: full damage
Groups:
Uncategorised

Syntax

Syntax:
getAllHitPointsDamage entity
Parameters:
entity: Object - object to be queried
Return Value:
Array - [] if entity is null or has no shape, otherwise [hitpointsNamesArray, selectionsNamesArray, damageValuesArray]

Examples

Example 1:
getAllHitPointsDamage player; //[ //["hitface","hitneck","hithead","hitpelvis","hitabdomen","hitdiaphragm","hitchest","hitbody","hitarms","hithands","hitlegs","incapacitated"], //["face_hub","neck","head","pelvis","spine1","spine2","spine3","body","arms","hands","legs","body"], //[0,0,0,0,0,0,0,0,0,0,0,0] //]

Additional Information

See also:
setHitPointDamagegetHitPointDamagesetHitIndexgetHitIndexsetHitgetHitsetDamagedamage

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

Bottom Section