Difference between revisions of "SetAmmoCapacity - InstanceData"
Jump to navigation
Jump to search
imported>Qazaaq (added f4se member) |
|||
(One intermediate revision by the same user not shown) | |||
Line 19: | Line 19: | ||
== Examples == | == Examples == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
; | ; 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) | |||
</source> | </source> | ||
Latest revision as of 17:03, 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[edit | edit source]
Function SetAmmoCapacity(Owner akOwner, int aiCapacity) Native Global
Parameters[edit | edit source]
- akOwner: Placeholder Description.
- aiCapacity: Placeholder Description.
Return Value[edit | edit source]
- None
Examples[edit | edit source]
; 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)