getAllHitPointsDamage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(\[\[[a-zA-Z ]+\]\].+) \|x1=" to " |r1=$1 |x1=")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma3
|game1= arma3
|1.50
|version1= 1.50
|arg= global
|arg= global


|gr1= Object Manipulation
|gr1= Object Manipulation


| 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:
|descr= 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
* 0: no damage
* 1: full damage
* 1: full damage


| '''getAllHitPointsDamage''' entity
|s1= [[getAllHitPointsDamage]] entity


|p1= entity: [[Object]] - object to be queried
|p1= entity: [[Object]] - object to be queried


|r1=[[Array]] - [] if entity is null or has no shape, otherwise [hitpointsNamesArray, selectionsNamesArray, damageValuesArray]
|r1= [[Array]] - [] if entity is null or has no shape, otherwise [hitpointsNamesArray, selectionsNamesArray, damageValuesArray]


|x1= <code>[[getAllHitPointsDamage]] [[player]];
|x1= <sqf>getAllHitPointsDamage player;
//[
//[
//["hitface","hitneck","hithead","hitpelvis","hitabdomen","hitdiaphragm","hitchest","hitbody","hitarms","hithands","hitlegs","incapacitated"],
//["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"],
//["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]
//[0,0,0,0,0,0,0,0,0,0,0,0]
//]
//]</sqf>
</code>


|x2= <code>[[getAllHitPointsDamage]] ([[vehicle]] [[player]]);
|x2= <sqf>getAllHitPointsDamage (vehicle player);
//[
//[
   //["hithull","hitengine","hitengine2","hitavionics","hitfuel","hitfuel2","hitglass1","hitlaileron","hitraileron","hitlcrudder","hitrrudder","hitlcelevator","hitrelevator","#gear_f_lights"],
   //["hithull","hitengine","hitengine2","hitavionics","hitfuel","hitfuel2","hitglass1","hitlaileron","hitraileron","hitlcrudder","hitrrudder","hitlcelevator","hitrelevator","#gear_f_lights"],
   //["hithull","hitengine","hitengine2","hitavionics","hitfuel","hitfuel2","hitglass1","hitlaileron","hitraileron","hitlcrudder","hitrrudder","hitlcelevator","hitrelevator"," "],
   //["hithull","hitengine","hitengine2","hitavionics","hitfuel","hitfuel2","hitglass1","hitlaileron","hitraileron","hitlcrudder","hitrrudder","hitlcelevator","hitrelevator"," "],
   //[0,0,0,0,0,0,0,0,0,0,0,0,0,0]
   //[0,0,0,0,0,0,0,0,0,0,0,0,0,0]
//]
//]</sqf>
</code>


|seealso= [[setHitPointDamage]], [[getHitPointDamage]], [[setHitIndex]], [[getHitIndex]], [[setHit]], [[getHit]], [[setDamage]], [[damage]]
|seealso= [[setHitPointDamage]] [[getHitPointDamage]] [[setHitIndex]] [[getHitIndex]] [[setHit]] [[getHit]] [[setDamage]] [[damage]]
}}
}}
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}

Revision as of 11:23, 13 May 2022

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:
Object Manipulation

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] //]
Example 2:
getAllHitPointsDamage (vehicle player); //[ //["hithull","hitengine","hitengine2","hitavionics","hitfuel","hitfuel2","hitglass1","hitlaileron","hitraileron","hitlcrudder","hitrrudder","hitlcelevator","hitrelevator","#gear_f_lights"], //["hithull","hitengine","hitengine2","hitavionics","hitfuel","hitfuel2","hitglass1","hitlaileron","hitraileron","hitlcrudder","hitrrudder","hitlcelevator","hitrelevator"," "], //[0,0,0,0,0,0,0,0,0,0,0,0,0,0] //]

Additional Information

See also:
setHitPointDamage getHitPointDamage setHitIndex getHitIndex setHit getHit setDamage damage

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