GetHitLocation

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

This condition function returns the hit location of the most recent successful hit.

Hit Locations[edit | edit source]

Hit location is taken from the most recently hit body part. Only direct hits such as those from either a melee attack or a projectile update an actors hit location. Indirect hits such as those from an explosion do not.

Specifically, hit location corresponds to the Part Type defined in the races Body Part Data form. If no Part Data exists for the collision, then GetHitLocation will return -1. If no collision exists for the Part Data, then GetHitLocation cannot return that Part Type - the only exception is if the body part is hit in VATS.

Hit Location Part Type
-1 None
0 Torso
1 Head1
2 Eye
3 LookAt
4 Fly Grab
5 Head2
6 LeftArm1
7 LeftArm2
8 RightArm1
9 RightArm2
10 LeftLeg1
11 LeftLeg2
12 LeftLeg3
13 RightLeg1
14 RightLeg2
15 RightLeg3
16 Brain
17 Weapon
18 Root
19 COM
20 Pelvis
21 Camera
22 Offset Root
23 Left Foot
24 Right Foot
25 Face Target Source

The following hit locations have been derived empirically: GetHitLocation.jpeg