getAllHitPointsDamage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (return format)
(vehicle -> entity)
Line 14: Line 14:
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''getAllHitPointsDamage''' vehicle|= Syntax
| '''getAllHitPointsDamage''' entity|= Syntax


|p1= vehicle : [[Object]] - vehicle to be queried |= Parameter 1
|p1= entiry: [[Object]] - vehicle to be queried |= Parameter 1


| [[Array]] - [] if object is null or has no shape, otherwise [hitpointsNamesArray, selectionsNamesArray, damageValuesArray]|= Return value
| [[Array]] - [] if entity is null or has no shape, otherwise [hitpointsNamesArray, selectionsNamesArray, damageValuesArray]|= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 15:15, 23 April 2016


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:
entiry: Object - vehicle 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"], // ["","neck","head","pelvis","spine1","spine2","spine3","body","","hands","legs"], // [0,0.0939002,0.0319932,0.0858595,0.174491,1,1,0.168495,1,0.5,0.195907] //]

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

Posted on September 27, 2015 - 00:42 (UTC)
PabstMirror
Will only return [] instead of [[],[],[]] if object has no hitpoints
Posted on April 22, 2016 - 23:40 (UTC)
Pierre MGI
To implement the PabstMirror's note, for example, cursorTarget (or cursorobject) pointing at sky returns [], but, pointing at a building like "Land_dp_smallFactory_F" returns [[],[],[]]. Hard to manage if you want to script something with the figures in third array. Try an intermediate value like _intermediate = if (getAllHitPointsDamage cursorObject isEqualTo [] or getAllHitPointsDamage cursorObject isEqualTo [[],[],[]]) then [{[[""],[""],[0]]},{getAllHitPointsDamage cursorObject}];