In the following tutorial I will show you how you build a password into your map that 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 entity and the other way is working with trigger_changetargets, 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.
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's target: correct1
Delay before reset: 1
Flags: 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 everything is!
Now you have to give them names! The six ones in the lower left corner maybe become the ones that 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 1) 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!
|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.
Buttons four and five are always wrong and never change their targets.
You can visualize the final product like this:
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.
You may scatter the trigger_changetargets in your whole map in order to make decompilers who want to know the password have a hard job!
Tip: You can also make it so you have to press the same button multiple times.
Important: For targets and names never enter 0. It just won't work.
Rate this tutorial
0 / 5 (0 votes)
Comments & discussion