GetItemCharge - ObjectReference

From Creation Kit
Jump to: navigation, search

SKSE Member of: ObjectReference Script

This Function will Return the Charge of an ObjectReference.


float Function GetItemCharge() native

Return Value

Returns the amount of charge remaining of an ObjectReference.


ObjectReference Property weaponRef Auto
String name
Float charge 
Function weaponcharge()
	charge = weaponRef.GetItemCharge()
	name = weaponRef.GetBaseObject().GetName()
	If (charge > 0.0)
		Debug.Trace(name + " currently has " + charge + " charge")
		Debug.Trace(name + " Is either at zero charge or does not have an enchant")
  • Do note that this will only work on a weapon that is currently loaded and not in a container.


  • This function can only be run on items outside of containers, as when they are put into containers member functions cannot be called on them.

See Also