Classes:Key
From ZDoom Wiki
| Key | |||
|---|---|---|---|
| Actor type | Internal | Game | |
| DoomEd Number | None | Class Name | Key |
Classes: Inventory→Key
→DoomKey
→HereticKey
→HexenKey
→StrifeKey
Keys are items that are used to open locked doors. The base class Key is never used directly. It is always the base class for predefined items (like Dooms Red Keycard) or for items defined in DECORATE.
Using in DECORATE
Keys use some of the basic Inventory properties but it is impossible to carry more than one of each key at any time. Therefore the amount settings don't have any function.
Keys don't define any properties of their own. If you want to define new keys you have to use the LOCKDEFS lump to assign them to locks.
Examples:
actor SilverKey : Key 10280
{
inventory.pickupmessage "Picked up the silver key."
inventory.icon "SLVKA0"
states
{
Spawn:
SLVK A -1
stop
}
}
actor GoldKey : Key 10281
{
inventory.pickupmessage "Picked up the gold key."
inventory.icon "GLDKA0"
states
{
Spawn:
GLDK A -1
stop
}
}
actor BronzeKey : Key 10282
{
inventory.pickupmessage "Picked up the bronze key."
inventory.icon "BRNKA0"
states
{
Spawn:
BRNK A -1
stop
}
}
DECORATE definition
Actor Key : Inventory native { +INVENTORY.INTERHUBSTRIP Inventory.PickupSound "misc/k_pkup" }

