{"name":"getHit","operator":null,"title":"getHit","type":"command","url":"https://community.bistudio.com/wiki/getHit","revid":340840,"updated":"2023-05-10T13:56:15Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.32"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.64"}],"since":{"game":"arma3","name":"Arma 3","version":"1.32"},"arma3_since":"1.32","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns selection damage. Same as getHitPointDamage, only the argument is selection part instead of hit point.\n\n> [!NOTE]\n> Some part names are in Czech; see the translation table.","syntaxes":[{"syntax":"vehicle getHit selection","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":"selection","type":"String","optional":false,"default":null,"description":"selection part name","types":["String"],"since":null,"text":"selection: String - selection part name"}],"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":"selection","types":["String"]}}],"examples":[{"text":"```sqf\nhint str (player getHit \"head\");\n```","code":["hint str (player getHit \"head\");"]},{"text":"```sqf\nprivate _engineDamage = _car getHit \"motor\";\n```","code":["private _engineDamage = _car getHit \"motor\";"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setHit","getHitPointDamage","setHitPointDamage","setDamage","damage","getHitIndex","setHitIndex"],"notes":[],"categories":["Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 1.32","Scripting Commands"]}