Classes:BackpackItem
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
Backpack item | |||
---|---|---|---|
Actor type | Internal | Game | (ZDoom) |
DoomEd Number | None | Class Name | BackpackItem |
Classes: Inventory→BackpackItem
→AmmoSatchel
→Backpack
→BagOfHolding
BackpackItem is the base class for all backpack-like items. This class itself is never used directly. Its only purpose is to be a base class for other items.
A child of this class contains a sample of each ammunition type and extends the carrying capacity of each ammunition type. However, the quantity of contained ammunition, and the size of the increase are qualities of the ammunition, not of the backpack. Therefore, it is not possible to make several different types of backpacks, such as a "regular backpack" that would double the basic carrying capacity and a "super backpack" that would triple it, for example. Or a "cursed backpack" that would reduce carrying capacity. Likewise, if you place a BagOfHolding (Heretic item) in Doom, you will find Doom-specific ammunitions in it!
Note that when a backpack is first picked up, it is added to the inventory. Backpacks picked up afterwards are not added to the inventory, their content is merely transferred to the first. (Or, more technically, the one already in the inventory intercepts the pickup attempt and just adds ammo to the inventory.) Picking up an AmmoSatchel, then a Backpack and finally a BagOfHolding will give you only the AmmoSatchel in your inventory, as the printinv
console command will tell you. If you want to have several different graphics for backpack pickups and need to check whether the player has a backpack or not, you should probably use instead CustomInventory items that give backpacks.
DECORATE definition
ACTOR BackpackItem : Inventory native {}
- Chex Quest actors
- Chex Quest internal actors
- Chex Quest 3 actors
- Chex Quest 3 internal actors
- Doom actors
- Doom internal actors
- Doom II actors
- Doom II internal actors
- Heretic actors
- Heretic internal actors
- Hexen actors
- Hexen internal actors
- Strife actors
- Strife internal actors
- ZDoom actors
- ZDoom internal actors
- Internal