Classes:Key
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
|
| 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 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" }
- 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