GetWeightClass - Armor

From Creation Kit
Jump to: navigation, search

SKSE Member of: Armor Script

Returns the weight class of the armor. (This function requires SKSE)

Syntax

int Function GetWeightClass() native

Parameters

None.

Return Value

An integer representing the weight class of the armor:

  • 0 = Light
  • 1 = Heavy
  • 2 = None

Examples

Armor PlayerShield = Game.GetPlayer().GetEquippedShield()
if (PlayerShield)
	int WeightClass = PlayerShield.GetWeightClass()
	if (WeightClass == 0)
		Debug.Trace("Player is equipped with a light shield.")
	elseif (WeightClass == 1)
		Debug.Trace("Player is equipped with a heavy shield.")
	else
		Debug.Trace("Strange! The player has a shield equipped, but it's neither light nor heavy.")
	endif
else
	Debug.Trace("Player doesn't have an equipped shield.")
endif

See Also