A massive demonic invasion has overwhelmed the Union Aerospace Corporation's Mars Research Facility, leaving only chaos and horror in its wake. As one of only a few survivors, you must fight your way to hell and back against a horde of evil monsters.

Report article RSS Feed Make a door and a keypad

This tutorial will guide you through the making of two rooms, a door, and a keypad. We will also make the door unlock when the correct code is entered into the keypad.

Posted by Spiderhund on Aug 2nd, 2008
Intermediate Mapping/Technical.

This tutorial will guide you through the making of a simple map with two rooms, a door and a keypad.
When you enter the correct code the door will unlock.

---Shortcut Setup

Before you start you will need a shortcut to the Doom 3 Editor.

To do this copy your original doom 3 shortcut.

Image Hosted by ImageShack.us

Right-click on the Copy and click properties.

Image Hosted by ImageShack.us

In the destination field enter this after the path to the doom 3 executable file:
+set r_fullscreen 0 +set r_multiSamples 0 +wait +wait +wait +editor

Image Hosted by ImageShack.us

Now to make the game run in fullscreen again when you run it.
Right-click on the original shortcut and click properties then add this:
+set r_fullscreen 1

Image Hosted by ImageShack.us

---Making the two rooms

Now run the Editor.

Image Hosted by ImageShack.us

Now click on Media>Textures>textures>base_floor>a_diafloor_1b_fin
This is the texture we will use (I will only use one texture for the floor and walls)

Image Hosted by ImageShack.us

Now draw a box in the top view and in the small windows (The caption is "Z") adjust the height of the box you just made.

Image Hosted by ImageShack.us

Now click on the "hollow tool"

Image Hosted by ImageShack.us

Press Escape (ESC) to deselect everything.
Draw a small box for a wall to seperate the two rooms.

Image Hosted by ImageShack.us

Press the Spacebar to duplicate the wall.
Now click in it and drag it to the other side.

Image Hosted by ImageShack.us

---Make and setup the door.

Press Escape.
Now select a new texture.
I use: Media>Textures>textures>base_door/airdoor

Now draw a box between our two walls.

Image Hosted by ImageShack.us

Right-click inside the new box (Our Door) and select.
func>func_door

This will make it a door and name it func_door_1 as default.

Image Hosted by ImageShack.us

Now click on the "Entity" button.

Image Hosted by ImageShack.us

I want my door to move up.
Click on the "Up" button.

Image Hosted by ImageShack.us

Here is the more tricky part.
In the "Key" field type: lip
In the "Val" field type: 1
Press Enter.

That will leave 1 unit of the door visible when the door is open.

Image Hosted by ImageShack.us

Now in the "Key" field type: locked
In the "Val" field type: 2
Press Enter.

This will lock the door when the maps starts.
If you type 2 the door will not open when it is unlocked.
If you type 1 the door will open when it is unlocked.

Image Hosted by ImageShack.us

---Make the keypad

Press Escape.
Right anywhere and select: func>func_static
This will create a box.

Image Hosted by ImageShack.us

Goto the "Entity" tab.
Click "Model"

Image Hosted by ImageShack.us

A window will pop up.
Select a (gui)model to use.
I will use: base/models/mapobjects/guiobjects/techdrpanel.lwo

click "OK"

Image Hosted by ImageShack.us

You can see the model in the 3d view and top view.
Note: If you can't see it just press the Spacebar to duplicate the object
then just delete the old one.

Move the panel into place just like the walls.
Rotate it by pressing the rotate Z button.(See screenshot below)

You can also move it up and down in the "Z" window.

Image Hosted by ImageShack.us
Image Hosted by ImageShack.us

Now click "Gui"
And select the gui you want to use, in this case we will use this:
base/guis/doors/areakeypad.gui

click "OK"

Image Hosted by ImageShack.us

Every gui have some "keys" that will control them. Those "keys" is called "gui_parm1", "gui_parm2", "gui_parm3" etc.

This gui have the "keys" 1 to 4.
1 to 3 is the code for the keypad and 4 is the location name.

So in the "Key" field type: gui_parm1
In the "Val" field type: 2
Press Enter.

In the "Key" field type: gui_parm2
In the "Val" field type: 5
Press Enter.

In the "Key" field type: gui_parm3
In the "Val" field type: 3
Press Enter.

So now the code for the door is 253.

Image Hosted by ImageShack.us

Now in the "Key" field type: gui_parm4
And in the "Val" field type: Locked Room
Press Enter.

Now the keypad will display "Locked Room"

Image Hosted by ImageShack.us

---Link the door to the keypad

This is simple just select the keypad(Hold shift and left-click on it)
Goto "Entity" and in the "Key" field type: target
In the "Val" field type: func_door_1
Press Enter.

You will see a blue line between the Keypad and the door.

Image Hosted by ImageShack.us

---Light and player

Press Escape.
Right click in one of the rooms.
Select Light.

This will create a light move it to where you want it and move it up and down by using the "Z" window.

Press the Spacebar to duplicate it and move the new light to the other room.

Image Hosted by ImageShack.us

Press Escape.
Right-Click in the room with the keypad.
Select: info>info_player_start

Image Hosted by ImageShack.us

Move the info_player_start down to the floor using the "Z" window.

---Compile

Now lets compile our map for use ingame.
Goto File>Save As.

THIS IS IMPORTENT!
Save the file to you doom3>base>maps folder and give it a name.
I called mine: doomtutorial.
If the maps folder doens't exist just create it.

Now you click "Bsp" and then "bsp"
The map will now compile.

---Testing

Now start Doom 3.
In the main menu press: ctrl + alt + ~
(~ = the button left to 1 on your keyboard)

The console will pop up.
Type: map "the name of the map"
Example: map doomtutorial

Your map will load up and if you done everything right you will have a locked door.
Try to enter the code and your door will unlock.

Image Hosted by ImageShack.us

Hope this helped someone out.
In the next tutorial I will cover the making of your own custom PDA.

Please leave a comment.

Post comment Comments
Freeman551
Freeman551 Aug 3 2008, 7:15am says:

cool

+2 votes     reply to comment
myles
myles Aug 3 2008, 11:25am says:

great work, custom PDA W00T!

+3 votes     reply to comment
Spiderhund Author
Spiderhund Aug 3 2008, 11:41am replied:

Yeah I will make a tutorial on that soon :)

+1 vote   reply to comment
PedobearNED
PedobearNED Jan 25 2009, 11:49am says:

on my map it says every single entitie is leakt!!!!

+1 vote     reply to comment
Ichiman94
Ichiman94 Jan 8 2010, 1:52pm says:

ty for door tut :)

+1 vote     reply to comment
adasdasf
adasdasf Mar 7 2010, 8:12am says:

what to put a pda

+1 vote     reply to comment
adasdasf
adasdasf Mar 7 2010, 8:31am says:

i speled wrong. how to put a pda?

+1 vote     reply to comment
atphalix
atphalix Jan 19 2013, 1:43pm says:

Nice tutorial, in fact it is not much different of Quake engines way to add a door so we can "convert" our old knowledge to new engine :)

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Doom III
Platforms
Windows, Mac, Linux, XBOX
Developer
id Software
Publisher
Activision
Engine
id Tech 4
Contact
Send Message
Official Page
Doom3.com
Release Date
Released Jul 31, 2004
Game Watch
Track this game
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
Doom III
Doom III Single & Multiplayer First Person Shooter
Related Engines
id Tech 4
id Tech 4 Commercial Released Aug 2, 2003
Related Groups
id Software
id Software Developer & Publisher