Difference between revisions of "GetItemMaxCharge - ObjectReference"
Jump to navigation
Jump to search
imported>Wafflesalot (Created page with "Category:Scripting Category:Papyrus Category:SKSE '''SKSE Member of:''' ObjectReference Script This Function will Return the maximum charge of an ObjectRefere...") |
imported>Wafflesalot m (Added link to SetItemCharge.) |
||
Line 36: | Line 36: | ||
*[[ObjectReference Script]] | *[[ObjectReference Script]] | ||
*[[GetItemCharge - ObjectReference]] | *[[GetItemCharge - ObjectReference]] | ||
*[[SetItemCharge - ObjectReference]] |
Latest revision as of 00:49, 26 February 2013
SKSE Member of: ObjectReference Script
This Function will Return the maximum charge of an ObjectReference.
Syntax[edit | edit source]
float Function GetItemMaxCharge() native
Return Value[edit | edit source]
Returns the maximum charge of an ObjectReference.
Examples[edit | edit source]
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[edit | edit source]
- 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.