All-in-one DOOM Key

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
SnakeEater
Posts: 42
Joined: Wed Apr 09, 2008 3:56 pm
Location: Raiding your stash so I can grab your shotgun, and blow your head off.

All-in-one DOOM Key

Post by SnakeEater »

How could I make a key that opens any of the 6 different key type of doors?
User avatar
SnakeEater
Posts: 42
Joined: Wed Apr 09, 2008 3:56 pm
Location: Raiding your stash so I can grab your shotgun, and blow your head off.

Re: All-in-one DOOM Key

Post by SnakeEater »

What I mean by this is that so you don't need separate keys to open different doors. But one that opens ANY door.
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Re: All-in-one DOOM Key

Post by Ryan Cordell »

Define a custom key in DECORATE, then you have to modify the LOCKDEFS lump to either replace every key with it, or just add it along side..
User avatar
SnakeEater
Posts: 42
Joined: Wed Apr 09, 2008 3:56 pm
Location: Raiding your stash so I can grab your shotgun, and blow your head off.

Re: All-in-one DOOM Key

Post by SnakeEater »

I don't know what you mean. Can you give me an example in a decorate code? I'm EXTREMELY confused right now.
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Re: All-in-one DOOM Key

Post by Ryan Cordell »

DECORATE:

Code: Select all

ACTOR RC_GS_RedKey : Key replaces RedCard
{
   Game Doom
   SpawnID 86
   Inventory.PickupMessage "$GOTREDKEYCARD"
   Inventory.PickupSound "object/accesscard"
   States
   {
   Spawn:
      RKEY A 10  BRIGHT  
      Loop
   }
}
LOCKDEFS:

Code: Select all

CLEARLOCKS //I'm not sure if I should have CLEARLOCKS in there, but hell.

Lock 1 Doom
{
	RC_GS_RedKey
	Message "$PD_REDC"
	RemoteMessage "You need a red card to activate this object"
	Mapcolor 255 0 0
}

Lock 129 Doom
{
	Any { RC_GS_RedKey RC_GS_RedSkullKey RC_GS_RedMasterKey KeyGreen }
	Message "$PD_REDK"
	RemoteMessage "$PD_REDO"
	Mapcolor 255 0 0
}
etc.
User avatar
Ichor
Posts: 1784
Joined: Wed Jul 23, 2003 9:22 pm

Re: All-in-one DOOM Key

Post by Ichor »

How about a key that simply gives you all six keys at once hwn you pick it up?
User avatar
SnakeEater
Posts: 42
Joined: Wed Apr 09, 2008 3:56 pm
Location: Raiding your stash so I can grab your shotgun, and blow your head off.

Re: All-in-one DOOM Key

Post by SnakeEater »

I could go with that. It's a master key. I kind of know how to script it. Give me an example anyways.
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Re: All-in-one DOOM Key

Post by Ryan Cordell »

Code: Select all

ACTOR DrWahweeKey : CustomInventory replaces RedCard
{
   Game Doom
   SpawnID 86
   Inventory.PickupMessage "$GOTREDKEYCARD"
   Inventory.PickupSound "object/accesscard"
   States
   {
   Spawn:
      RKEY A 10  BRIGHT 
      Loop
   Pickup:
      TNT1 A 0 A_GiveInventory("RedKey",1)
      TNT1 A 0 A_GiveInventory("BlueKey",1)
      TNT1 A 0 A_GiveInventory("YellowKey",1)
      Stop
   }
}
and so on.
User avatar
SnakeEater
Posts: 42
Joined: Wed Apr 09, 2008 3:56 pm
Location: Raiding your stash so I can grab your shotgun, and blow your head off.

Re: All-in-one DOOM Key

Post by SnakeEater »

Works for me. Thanks. I'll edit it too my extent.
Locked

Return to “Editing (Archive)”