Classes:Key
Classes: Inventory→Key
→DoomKey
→HereticKey
→HexenKey
→StrifeKey
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
|
Key | |||
---|---|---|---|
Actor type | Internal | Game | ![]() |
DoomEd Number | None | Class Name | Key |
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 Doom's 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.
If the Species property is set to an existing key, the new key will work locks in the same way as the old one. For example, setting the key's species to RedCard will allow it to open locks as if it were a red keycard.
Keys don't define any properties of their own. If you want to define entirely new keys, you must 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 { +DONTGIB +INVENTORY.INTERHUBSTRIP Inventory.PickupSound "misc/k_pkup" }