Difference between revisions of "GetHitLocation"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Kkuhlmann
 
imported>Talkie Toaster
 
(7 intermediate revisions by 5 users not shown)
Line 13: Line 13:


=='''Notes'''==
=='''Notes'''==
*This information is not available in the [[OnHit]] and [[OnHitWith]] script blocks, unlike [[GetLastHitCritical]].
*The body locations and corresponding numbers are:
*The body locations and corresponding numbers are:
**NONE     = -1
<dl><dd> <!-- HTML indentation for the table -->
**TORSO      = 0        
{|
**HEAD_1     = 1
! Body Part
**HEAD_2      = 2  
! Return Value
**LEFT_ARM_1  = 3
|-
**LEFT_ARM_2  = 4
| None
**RIGHT_ARM_1 = 5
| -1
**RIGHT_ARM_2 = 6  
|-
**LEFT_LEG_1  = 7
| Torso
**LEFT_LEG_2  = 8
| 0  
**LEFT_LEG_3  = 9
|-      
**RIGHT_LEG_1 = 10
| Head 1
**RIGHT_LEG_2 = 11
| 1  
**RIGHT_LEG_3 = 12
|-
**BRAIN      = 13
| 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
|}
</dl> <!-- closing the HTML indentation of the table -->
*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.


==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'''==
=='''See Also'''==
Line 40: Line 85:


[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (GECK 1.1)]]
[[Category:Condition Functions]]
[[Category:Condition Functions]]
[[Category:Condition Functions (GECK 1.1)]]

Latest revision as of 09:54, 29 June 2010

Description[edit | edit source]

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

Syntax[edit | edit source]

[ActorREF.]GetHitLocation

Examples[edit | edit source]

if BuddyRef.GetHitLocation == 0

This would determine if Buddy got hit in the torso.

Notes[edit | edit source]

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
  • 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.

Human Body Parts[edit | edit source]

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[edit | edit source]

Reference[edit | edit source]

None provided.