From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do not need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it's actually harmful as it can cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
  5. There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
Puzzle item
Actor type Internal Game MiniZDoomLogoIcon.png (ZDoom)
DoomEd Number None Class Name PuzzleItem

Classes: InventoryPuzzleItem

PuzzleItems are special inventory items that don't have any function themselves. They can be used with the UsePuzzleItem special to trigger special actions that depend on the presence of these items in a player's inventory. Essentially they act like keys that get removed once they have been used. The base class PuzzleItem is never used directly. It is always the base class for predefined items (like Hexen's Clock gears or for items defined in DECORATE).


PuzzleItems use the basic Inventory properties to define their behavior as inventory items. In addition they define three additional properties:

  • PuzzleItem.Number value
Defines the number that has to be used with UsePuzzleItem to identify the item.
  • PuzzleItem.FailMessage string
Message to be displayed when this item is used and not the one requested by UsePuzzleItem.
  • PuzzleItem.FailSound sound
Sound to be played when the item is used, but is not the one requested by UsePuzzleItem. Default is the player class specific *puzzfail sound.


actor PigHead : PuzzleItem 19018
  puzzleitem.number 17
  inventory.pickupmessage "A Pig's head"
  inventory.icon "PIGHEAD"
    PHED A -1

DECORATE definition

ACTOR PuzzleItem : Inventory native 
  Inventory.UseSound "PuzzleSuccess"
  Inventory.PickupSound "misc/i_pkup"