{"name":"setHitIndex","title":"setHitIndex","type":"command","url":"https://community.bistudio.com/wiki/setHitIndex","revid":377888,"updated":"2026-01-04T16:34:13Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.50"},"since":"arma3 1.50","arma3_since":"1.50","locality":{"argument":"local","effect":"global"},"description":"Sets the current level of damage for a specific Hit Point. All hit points can be obtained with getAllHitPointsDamage command.","syntaxes":[{"syntax":"vehicle setHitIndex [hitPartIndex, damage, useEffects, killer, instigator, breakRotor]","params":[{"name":"vehicle","type":"Object","description":"vehicle to be damaged","type_expr":"Object","text":"vehicle : Object - vehicle to be damaged"},{"name":"hitPartIndex","type":"Number","description":"hit part index of the Hit Point","type_expr":"Number"},{"name":"damage","type":"Number in range 0..1","description":"level of damage, 0 = no damage, 1 = full damage","type_expr":"Number"},{"name":"useEffects","type":"Boolean","optional":true,"default":"true","description":"false to skip destruction effects","type_expr":"Boolean","since":"arma3 1.68","text":"useEffects: Boolean - (Optional, default true) false to skip destruction effects"},{"name":"killer","type":"Object","optional":true,"default":"objNull","description":"the entity that caused the damage. If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- It can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- It will alter the killer's rating as if the killer directly killed the unit.\n- It will be listed as `_killer` parameter in the Killed event handler.","type_expr":"Object","since":"arma3 2.08","text":"killer: Object - (Optional, default objNull) the entity that caused the damage. If the damage leads to the death of the unit, the killer will be used as the object that caused the kill.\n\n- It can be used to show \"killed by player\" in debriefing statistics and kill messages in the chat (if death messages are enabled).\n- It will alter the killer's rating as if the killer directly killed the unit.\n- It will be listed as `_killer` parameter in the Killed event handler."},{"name":"instigator","type":"Object","optional":true,"default":"objNull","description":"the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler.","type_expr":"Object","since":"arma3 2.12","text":"instigator: Object - (Optional, default objNull) the person that instigated the damage.\n\n- if a tank is a killer, the tank gunner that pulled the trigger is instigator\n- it will be listed as `_instigator` parameter in the Killed event handler."},{"name":"breakRotor","type":"Boolean","optional":true,"default":"false","description":"if the hitpoint is rotor on a helicopter, true will break the rotor as well as play corresponding sound if 'useEffects' is also true.","type_expr":"Boolean","since":"arma3 2.18","text":"breakRotor: Boolean - (Optional, default false) if the hitpoint is rotor on a helicopter, true will break the rotor as well as play corresponding sound if 'useEffects' is also true."}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"[hitPartIndex, damage, useEffects, killer, instigator, breakRotor]"}}],"examples":[{"code":["vehicle player setHitIndex [1, 1];"]},{"code":["player setHitIndex [7, 0.5];"]}],"see_also":["getAllHitPointsDamage","getHitIndex","getHitPointDamage","setHitPointDamage","setHit","getHit","setDamage","damage","forceHitPointsDamageSync"]}