Difference between revisions of "SetAmmoCapacity - InstanceData"

imported>Qazaaq
(added f4se member)
 
Line 19: Line 19:
== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
; Placeholder Code.
; set up the weapon instance
int slotIndex = PlayerRef.GetEquippedItemType(0) + 32
instanceData:Owner thisInstance = PlayerRef.GetInstanceOwner(slotIndex)
 
; max ammo capacity
int AmmoCapacity = instanceData.GetAmmoCapacity(thisInstance) as int
; increase capacity by 1
instancedata.SetAmmoCapacity(thisInstance, AmmoCapacity + 1)
</source>
</source>


12

edits