View Full Version : Keypad Tutorial

30-11-2008, 04:11 PM
I just am a bit euphoric that I found lots of old data on the HDD
of my old PC, including this tutorial, thus I am posting it now.
The ancient imageshack.us images still exist!
Note that this tutorial is ancient, too. D;

How to make passwords you need to enter at some point in your map (by Silencer)
In the following tutorial I will show you how you build a password into your map,
you have to enter, so a door opens or something else happens!
(Just like in surf_ninja and surf_justice)
BTW: The sense of these passwords is to make people go to a website they see somewhere in
the maps credits hoping they find the correct password! Very useful if you need visitors on your site!
There are two ways to do this! One way is working with the multisource point entitiy and the other
way is working with trigger_change_targets, which is the way I will teach you in this tutorial!
The multisource way is often confusing the CS Players that do not understand mapping really.
If you still want to know how this works visit VERC's Half-Life entities section (http://collective.valve-erc.com/index.php?area=entity&game=hl) and you will understand
the multisource way by yourself fast!

Step 1: func_button:
At first you have to build some func_buttons!
Think of a password! For example: 1, 2 and 3!
Also make wrong numbers: 4 and 5! And then
make one as ENTER! Give them the correct textures
and use the following properties:

Name: 1, 2, 3, 4, 5 and enter
Target: wrong; button 1: correct1
Delay before reset: 1

Don't move

Step 2: trigger_changetarget:
In this example I have to use 14 trigger_changetargets!
Place them like in this picture, so you always know, where what is!
http://img254.echo.cx/img254/6066/start4vu.png (http://www.imageshack.us)
Now you have to give them names! The six ones in the downer left corner maybe
become the ones, which change the buttons targets, so the password works! Start
with those two trigger_changetargets, which are above the first func_button (button 1)
Give them the name correct1, so the first func_button (button one)
triggers them both! Give all three trigger_changetargets of the six I am talking about,
which are under the 3 upper ones as "new target" wrong! The targets whose
name they change are the 3 buttons (1, 2 and 3) under them! So type the func_buttons
names as the 3 trigger_changetargets targets! If you now press button one, this button
becomes wrong and you have to press the next one! So now we have to give the upper
3 trigger_changetargets more properties, so there is a next, correct button!

Name Target New Target
Upper left trigger_changetarget: correct1 2 correct2
trigger_changetarget in the upper middle: correct2 3 correct3
Upper right trigger_changetarget: correct3 enter object
Now there are 8 more trigger_changetargets! Mark 4 of them and give them the
name object! Mark the other four ones and give these the name wrong!
Two of them shall change the target of button 1 to correct1!
Two of them shall change the target of button 2 to wrong!
Two of them shall change the target of button 3 to wrong!
Two of them shall change the target of the enter button to wrong!
Button four and five are always wrong and never get changed their targets!
Make the trigger_changetargets properties so, that that is done!
You can visualize the final product like this:
http://img293.echo.cx/img293/4813/epwentendsilx4wx.png (http://www.imageshack.us)

Part 3: An object:
Now you have to build an object which should be triggered!
For example a door with weapons and stuff behind it!
Give it the name object!

Final Notice: You may scatter the trigger_change_targets in your whole map in
order to make decompilers who want to know the password have a hard job!

Tipp: It is also possible to make it being neccessary to press the same button multiple times!

Important: For targets and names never enter 0! It just won't work. D;

30-11-2008, 05:19 PM
Here's another one: http://a1win.pp.fi/hammer/combolock.html

30-11-2008, 06:07 PM
A shame we don't have Radiation up and running. We would be able to have loads of tutorials there.