{"name":"setHitIndex","operator":null,"title":"setHitIndex","type":"command","url":"https://community.bistudio.com/wiki/setHitIndex","revid":377888,"updated":"2026-01-04T16:34:13Z","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":"local","effect":"global","server_exec":false},"exec":null,"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]","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":"vehicle to be damaged","types":["Object"],"since":null,"text":"vehicle : Object - vehicle to be damaged"},{"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"},{"name":"damage","type":"Number in range 0..1","optional":false,"default":null,"description":"level of damage, 0 = no damage, 1 = full damage","types":["Number"],"since":null,"text":"damage: Number in range 0..1 - level of damage, 0 = no damage, 1 = full damage"},{"name":"useEffects","type":"Boolean","optional":true,"default":"true","description":"false to skip destruction effects","types":["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\n- It will alter the killer's rating as if the killer directly killed the unit.\n\n- It will be listed as `_killer` parameter in the Killed event handler.","types":["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\n- It will alter the killer's rating as if the killer directly killed the unit.\n\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- 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.","types":["Object"],"since":"arma3 2.12","text":"instigator: Object - (Optional, default objNull) the person that instigated the damage.\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.","types":["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","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"[hitPartIndex, damage, useEffects, killer, instigator, breakRotor]","types":["Array"]}}],"examples":[{"text":"```sqf\nvehicle player setHitIndex [1, 1];\n```","code":["vehicle player setHitIndex [1, 1];"]},{"text":"```sqf\nplayer setHitIndex [7, 0.5];\n```","code":["player setHitIndex [7, 0.5];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getAllHitPointsDamage","getHitIndex","getHitPointDamage","setHitPointDamage","setHit","getHit","setDamage","damage","forceHitPointsDamageSync"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 1.50","Scripting Commands","Scripting Commands: Global Effect"]}