IsLimbCrippled

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin.

Description

Returns 1 if a limb (specified by LimbIndex) is crippled. If no LimbIndex is specified, or if it is set to -1, instead returns 1 if any limb is crippled.

The "isCrippled" check is performed by checking if the Actor Value for that limb's condition is at or below 0. The minimum amount of health for a limb to be considered "crippled" by this function can be modified by changing healthThreshold.

Syntax

[help]
(0/1:isCrippled) ActorRefr.IsLimbCrippled LimbIndex:int healthThreshold:int

Example

SunnyRef.IsLimbCrippled 13    

Tests if SunnyRef's head is crippled (or brain, specifically).

Player.IsLimbCrippled  

Tests if the Player has any limbs crippled or not.

Notes

  • The body locations and corresponding numbers are:
Body Part Return Value
Any Limb -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

See Also