GetWeaponAmmo

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the Fallout Script Extender.

Description

Returns the ammo used by the specified weapon or calling reference.

Syntax

[help]
(Ammo-or-FormList) ref.GetWeaponAmmo Weapon:form 

Or:

(Ammo-or-FormList) ref.GetAmmo Weapon:form

Example

ref rAmmo
set rAmmo to GetWeaponAmmo Weap10mmPistol

Notes

  • Beware that in Fallout New Vegas, weapons may use either an ammo (typecode: 41) or a form list (typecode: 85) containing multiple ammos for this field. To be safe, one can use GetType to check the return. Also, Weapons that do not use ammo will return 0.

See Also