Classes:Key
From ZDoom Wiki
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 |
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 { +DONTGIB +INVENTORY.INTERHUBSTRIP Inventory.PickupSound "misc/k_pkup" }
Categories:
- Chex Quest actors
- Chex Quest internal actors
- Chex Quest 3 actors
- Chex Quest 3 internal actors
- Doom actors
- Doom internal actors
- Doom II actors
- Doom II internal actors
- Heretic actors
- Heretic internal actors
- Hexen actors
- Hexen internal actors
- Strife actors
- Strife internal actors
- ZDoom actors
- ZDoom internal actors
- Internal