{"name":"getHitIndex","operator":null,"title":"getHitIndex","type":"command","url":"https://community.bistudio.com/wiki/getHitIndex","revid":340842,"updated":"2023-05-10T13:57:50Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.50"}],"since":{"game":"arma3","name":"Arma 3","version":"1.50"},"arma3_since":"1.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Return current level of damage for a specific Hit Point (specified by its hit part index). All hit points can be obtained with getAllHitPointsDamage command.\n- 0: no damage\n- 1: full damage","syntaxes":[{"syntax":"vehicle getHitIndex hitPartIndex","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"vehicle to be queried","types":["Object"],"since":null,"text":"vehicle : Object - vehicle to be queried"},{"name":"hitPartIndex","type":"Number","optional":false,"default":null,"description":"hit part index of the Hit Point","types":["Number"],"since":null,"text":"hitPartIndex: Number - hit part index of the Hit Point"}],"returns":{"type":"Number","types":["Number"],"description":"before Arma 3 v1.94, Nothing was returned when an invalid selection was provided (now returns `0`)","text":"Number - before Arma 3 v1.94, Nothing was returned when an invalid *selection* was provided (now returns `0`)"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"hitPartIndex","types":["Number"]}}],"examples":[{"text":"```sqf\nvehicle player getHitIndex 3;\n```","code":["vehicle player getHitIndex 3;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getAllHitPointsDamage","setHitIndex","setHitPointDamage","getHitPointDamage","setHit","getHit","setDamage","damage"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 1.50","Scripting Commands"]}