getAllHitPointsDamage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[[Cc]ategory:[ _]?Arma[ _]3:[ _]([^|]*)[ _]?\|.*\]\]" to "{{GameCategory|arma3|$1}}")
m (Text replacement - "↵↵</sqf>" to " </sqf>")
 
(33 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3|Game name=
|game1= arma3
|1.50|Game version=
|version1= 1.50
|arg= global|Multiplayer Arguments=
|arg= global


|gr1= Object Manipulation |GROUP1=
|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= Get provided object's hit points damage.
* 0: no damage
* 1: full damage |DESCRIPTION=
____________________________________________________________________________________________


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


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


| [[Array]] - [] if entity is null or has no shape, otherwise [hitpointsNamesArray, selectionsNamesArray, damageValuesArray]|RETURNVALUE=
|r1= [[Array]] - [] if entity is null or has no shape, otherwise [hitpointNames, selectionNames, damageValues]:
____________________________________________________________________________________________
* hitpointNames: [[Array]] of [[String]]s
* selectionNames: [[Array]] of [[String]]s
* damageValues: [[Array]] of [[Number]]s - in range 0..1 where 0 = no damage, 1 = full damage
All values in all arrays are ordered accordingly to hit part index for convenience and for use in [[setHitIndex]] and [[getHitIndex]].


|x1= <code>[[getAllHitPointsDamage]] [[player]];
|x1= <sqf>
//[
hint str 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]
["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"],
</code> |Example1=
[0,0,0,0,0,0,0,0,0,0,0,0]
]
*/
</sqf>


|x2= <code>[[getAllHitPointsDamage]] ([[vehicle]] [[player]]);
|x2= <sqf>
//[
hint str 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]
["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"," "],
</code> |=
[0,0,0,0,0,0,0,0,0,0,0,0,0,0]
 
]
| [[setHitPointDamage]], [[getHitPointDamage]], [[setHitIndex]], [[getHitIndex]], [[setHit]], [[getHit]], [[setDamage]], [[damage]] |SEEALSO=
*/
</sqf>


|seealso= [[setHitPointDamage]] [[getHitPointDamage]] [[setHitIndex]] [[getHitIndex]] [[setHit]] [[getHit]] [[setDamage]] [[damage]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
</dl>
<h3 style="display:none">Bottom Section</h3>
{{GameCategory|arma3|New_Scripting_Commands_List}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

Latest revision as of 19:48, 3 September 2024

Hover & click on the images for description

Description

Description:
Get provided object's hit points 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 [hitpointNames, selectionNames, damageValues]: All values in all arrays are ordered accordingly to hit part index for convenience and for use in setHitIndex and getHitIndex.

Examples

Example 1:
hint str 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:
hint str 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