GetWeaponAmmo
From GECK
(Redirected from GetAmmo)
A function added by the Fallout Script Extender.
Contents
Description
Returns the ammo (or FormList of Ammo) used by the specified Weapon BaseForm. If weapon is omitted and a calling reference is provided, that reference's BaseForm is used.
Syntax
(ammoOrFormlist:baseForm) weaponRefr.GetWeaponAmmo weapon:baseform
Or:
(ammoOrFormlist:baseForm) weaponRefr.GetAmmo weapon:baseform
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.