Classes:BackpackItem
Classes: Inventory→BackpackItem
→AmmoSatchel
→Backpack
→BagOfHolding
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
Backpack item | |||
---|---|---|---|
Actor type | Internal | Game | ![]() |
DoomEd Number | None | Class Name | BackpackItem |
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.