Difference between revisions of "GetAmmo - InstanceData"
Jump to navigation
Jump to search
(Removed the placeholders in favor of a clear description. This is still rough, edits are welcome!) |
|||
Line 3: | Line 3: | ||
{{Template:Papyrus:RequiredF4SE|version=0.3.1}} | {{Template:Papyrus:RequiredF4SE|version=0.3.1}} | ||
Retreive the ammo a weapon object has. | |||
== Syntax == | == Syntax == | ||
Line 11: | Line 11: | ||
== Parameters == | == Parameters == | ||
*akOwner: | *akOwner: The weapon object to check the ammunition of. | ||
== Return Value == | == Return Value == | ||
* | *Ammo | ||
== Examples == | == Examples == |
Latest revision as of 15:59, 12 May 2023
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.
Syntax[edit | edit source]
Ammo Function GetAmmo(Owner akOwner) Native Global
Parameters[edit | edit source]
- akOwner: The weapon object to check the ammunition of.
Return Value[edit | edit source]
- Ammo
Examples[edit | edit source]
; 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)