Classes:Ammo
Classes: Inventory→Ammo
→BlasterAmmo
→Cell
→Clip
→ClipOfBullets
→CrossbowAmmo
→ElectricBolts
→EnergyPod
→GoldWandAmmo
→HEGrenadeRounds
→MaceAmmo
→Mana1
→Mana2
→MiniMissiles
→PhoenixRodAmmo
→PhosphorusGrenadeRounds
→PoisonBolts
→RocketAmmo
→Shell
→SkullRodAmmo
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
Ammo | |||
---|---|---|---|
Actor type | Internal | Game | ![]() |
DoomEd Number | None | Class Name | Ammo |
An Ammo item defines ammunition for use by weapons. For the most part ammo acts like a normal inventory item but there are some differences:
- Only items that inherit directly from Ammo are separate types. All items that inherit from a subclass of Ammo define new pickup items for that ammo type.
- The amount of ammo the player can carry can be affected by picking up a subclass of BackpackItem.
- The amount of ammo each item gives the player can be increased for the easiest and hardest skill level in the game.
- Ammunition is never placed in the inventory bar. Instead, it is shown in its own place on the HUD or status bar.
Using in DECORATE
Ammo items support all the basic Inventory properties. In addition they define:
- Ammo.BackpackAmount amount
- The amount of this ammo type received from a backpack.
- Ammo.BackpackMaxAmount amount
- The maximum amount of this ammo type that can be carried with a backpack.
- Ammo.DropAmount amount
- Specifies the amount of ammo a dropped item without any explicit amount given contains. Since you can specify the amount with DropItem this is mainly to customize the amount of items dropped by Strife dialogue scripts.
Note that ammo capacity (Inventory.MaxAmount, Ammo.BackpackAmount and Ammo.BackpackMaxAmount) are only relevant for a type derived directly from Ammo, such as Clip. Types with further derivation (such as ClipBox which is derived from Clip) use their parent class's amounts.
Examples:
This defines a new ammo type:
actor LaserRecharge : Ammo 10471 { Inventory.PickupMessage "Laser recharge unit" Inventory.Amount 10 Inventory.MaxAmount 200 Inventory.Icon "AAMOA0" Ammo.BackpackAmount 10 Ammo.BackpackMaxAmount 400 states { Spawn: ZCLP A -1 stop } }
This defines a second pickup item for the same ammo type:
actor LargeLaserRecharge : LaserRecharge 10472 { Inventory.PickupMessage "Large laser recharge unit" Inventory.Amount 50 states { Spawn: AAMO A -1 stop } }
DECORATE definition
ACTOR Ammo : Inventory native { +INVENTORY.KEEPDEPLETED Inventory.PickupSound "misc/ammo_pkup" }
See also
- Classes in the Ammo category