GetWeightClass - Armor
Revision as of 11:14, 10 May 2012 by imported>Fg109 (Created page for GetWeightClass)
SKSE Member of: Armor Script
Returns the weight class of the armor.
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