GetHitLocation

From GECK
Jump to: navigation, search


A function included in the GECK for Fallout 3.

Description

Returns the hit location (of the most recent hit?).

Syntax

[help]
(LocationIndex:int) [Actor].GetHitLocation

Example

if BuddyRef.GetHitLocation == 0

This would determine if Buddy got hit in the torso.

Notes

  • This information is not available in the OnHit and OnHitWith script blocks (fixed in JIP NVSE Plugin v55.60).
  • This information is available in a UDF event handler script for OnHit and OnHitWith
  • This information is available in a UDF script for SetOnCriticalHitEventHandler
  • GetHitLocation won't work if used in a weapon's Object Effect, but will work if used in the weapon's Crit Effect.
  • GetHitLocation will only return the correct value in a GameMode block in the frame that the reference is killed.
  • The body locations and corresponding numbers are:
Body Part Return Value
None -1
Torso 0
Head 1 1
Head 2 2
Left Arm 1 3
Left Arm 2 4
Right Arm 1 5
Right Arm 2 6
Left Leg 1 7
Left Leg 2 8
Left Leg 3 9
Right Leg 1 10
Right Leg 2 11
Right Leg 3 12
Brain 13
Hand or Weapon 14
  • Always returns -1 for hits that originated from an Explosion.

Human Body Parts

The body parts of a typical human actor are 0 (Torso), 1 (Head 1), 3 (Left Arm 1), 5 (Right Arm 1), 7 (Left Leg 1), and 10 (Right Leg 1). This information is defined in the DefaultBodyPartData BodyPartData object.

See Also