Background for Fallout 4
Member of the InstanceData script
voidfunctionSetAmmoCapacity(InstanceData:OwnerakOwner, intcapacity)NativeGlobal


Parameters

  1. InstanceData:OwnerakOwner

    CK Wiki Description

    Placeholder Description.

  2. intcapacity

    CK Wiki Description

    Placeholder Description.


Examples

; 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)

Auto-Generated Example

InstanceData:Owner myInstanceData_Owner__akOwner
int myInt__capacity

InstanceData.SetAmmoCapacity(myInstanceData_Owner__akOwner, myInt__capacity)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.