GetAmmo - InstanceData

Revision as of 16:59, 12 May 2023 by 109.133.194.147 (talk) (Removed the placeholders in favor of a clear description. This is still rough, edits are welcome!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This article has been flagged as incomplete.
Please help improve the wiki by learning how to contribute.

F4SE Member of: InstanceData Script
Requires F4SE version 0.3.1 or higher.

Retreive the ammo a weapon object has.

SyntaxEdit

Ammo Function GetAmmo(Owner akOwner) Native Global

ParametersEdit

  • akOwner: The weapon object to check the ammunition of.

Return ValueEdit

  • Ammo

ExamplesEdit

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

See AlsoEdit