GetItemMaxCharge - ObjectReference

From Creation Kit
Jump to: navigation, search

SKSE Member of: ObjectReference Script

This Function will Return the maximum charge of an ObjectReference.

Syntax

float Function GetItemMaxCharge() native

Return Value

Returns the maximum charge of an ObjectReference.

Examples

ObjectReference Property weaponRef Auto
String name
Float maxcharge 
 
Function weaponmaxcharge()
	maxcharge = weaponRef.GetItemMaxCharge()
	name = weaponRef.GetBaseObject().GetName()
	Debug.Trace(name + "'s maximum charge is " + maxcharge)
EndFunction
  • Do note that this will only work on a weapon that is currently loaded and not in a container.

Notes

  • 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