Background for Fallout 4
Member of the InstanceData script
AmmofunctionGetAmmo(InstanceData:OwnerakOwner)NativeGlobal

Description

Wiki Description

Retreive the ammo a weapon object has.


Caveats


Parameters

InstanceData:OwnerakOwner

CK Wiki Description

The weapon object to check the ammunition of.


Examples

; set up the weapon instance
int slotIndex = PlayerRef.GetEquippedItemType(0) + 32
instanceData:Owner thisInstance = PlayerRef.GetInstanceOwner(slotIndex)

; ammo type currently in the weapon
Ammo ChamberedAmmo = instanceData.GetAmmo(thisInstance)

Auto-Generated Example

InstanceData:Owner myInstanceData_Owner__akOwner

Ammo returnedValue = InstanceData.GetAmmo(myInstanceData_Owner__akOwner)

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.