Difference between revisions of "GetAmmo - InstanceData"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Qazaaq
(added f4se member)
 
Line 18: Line 18:
== 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)
 
; ammo type currently in the weapon
Ammo ChamberedAmmo = instanceData.GetAmmo(thisInstance)
</source>
</source>



Revision as of 17:01, 14 October 2022

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.

Placeholder Description.

Syntax

Ammo Function GetAmmo(Owner akOwner) Native Global

Parameters

  • akOwner: Placeholder Description.

Return Value

  • Placeholder Description.

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)

See Also