Difference between revisions of "GetWeightClass - Armor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Fg109
(Created page for GetWeightClass)
 
imported>Fg109
m
 
Line 4: Line 4:
'''SKSE Member of:''' [[Armor Script]]
'''SKSE Member of:''' [[Armor Script]]


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


== Syntax ==
== Syntax ==

Latest revision as of 11:17, 10 May 2012

SKSE Member of: Armor Script

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

Syntax[edit | edit source]

int Function GetWeightClass() native

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

An integer representing the weight class of the armor:

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

Examples[edit | edit source]

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