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 0    

Tests if SunnyRef's head is crippled.

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
Head 0
Torso 1
Left Arm 2
Right Arm 3
Left Leg 4
Right Leg 5
Brain 6

See Also