SetItemCharge - ObjectReference
Revision as of 00:38, 26 February 2013 by imported>Wafflesalot (Wafflesalot moved page SetItemCharge- ObjectReference to SetItemCharge - ObjectReference: To remain uniform with other titles. I wasn't looking at the Title as I should have while creating the page my apologies.)
SKSE Member of: ObjectReference Script
This Function will set a ObjectReference's charge to the specified amount.
Syntax
Function SetItemCharge(float charge) native
Parameters
- charge - The amount, as a float you wish to set the Objects charge to.
Examples
ObjectReference Property weaponRef Auto
Float charge
Function setWeaponcharge()
Charge = weaponRef.GetItemCharge()
weaponref.SetItemCharge((Charge + 100.0)); Adds 100 to the Current Charge.
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.