Background for Skyrim SE
Member of the ObjectReference script
floatfunctionGetItemCharge()Native

Description

Wiki Description

This Function will Return the Charge of an ObjectReference.


Caveats

CK Wiki - 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.

Examples

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")
    Else
        Debug.Trace(name + " Is either at zero charge or does not have an enchant")
    EndIf
EndFunction

Auto-Generated Example

float returnedValue = myObjectReference__toCallFunctionOn.GetItemCharge()

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.