Classes:PuzzleItem
Classes: Inventory→PuzzleItem
→PuzzBook1
→PuzzBook2
→PuzzCWeapon
→PuzzFlameMask
→PuzzFWeapon
→PuzzGear1
→PuzzGear2
→PuzzGear3
→PuzzGear4
→PuzzGemBig
→PuzzGemBlue1
→PuzzGemBlue2
→PuzzGemGreen1
→PuzzGemGreen2
→PuzzGemRed
→PuzzMWeapon
→PuzzSkull
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
Puzzle item | |||
---|---|---|---|
Actor type | Internal | Game | ![]() |
DoomEd Number | None | Class Name | PuzzleItem |
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).
Using 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.
Examples:
actor PigHead : PuzzleItem 19018
{
puzzleitem.number 17
inventory.pickupmessage "A Pig's head"
inventory.defmaxamount
inventory.icon "PIGHEAD"
states
{
Spawn:
PHED A -1
stop
}
}
DECORATE definition
ACTOR PuzzleItem : Inventory native { +NOGRAVITY +INVENTORY.INVBAR Inventory.DefMaxAmount Inventory.UseSound "PuzzleSuccess" Inventory.PickupSound "misc/i_pkup" }