You might be thinking thinking why the hell I did a tutorial over keys cause they are just items that you can place anywhere and they have no spawnflags or key value pairs to mess with. Well you are right. They are very simple to put in your level but getting some use out of them is a different story.
There are 9 different kinds of keys. They are key_airstrike_target,
key_blue_key,
key_commander_head,
key_data_cd,
key_data_spinner,
key_pass,
key_power_cube,
key_pyramid, and
key_red_key. All of them act in exactly the same way, they just look different. What's cool about the keys is that they can be used to trigger anything you want them to, not just doors. You could have a key stop a turbine or make a computer explode. The possibilities are endless.
To get the keys to do these kind of things you must use a few different entities. For example:
Lets make it so that you have to use a key_data_spinner to turn off a big fan.
First we would make the fan of course and make it into a func_rotating and then make the computer that you will stick the key_data_spinner into that will turn off the fan. If you don't know how to do this then I suggest you check out my tutorial on the func_rotating entity. You also need to give the func_rotating a targetname. Lets give it a targetname of fan. targetname=fan.
The next thing we want to do is to place a trigger_key somewhere in the level and target it to the fan. target=fan. You should also give the trigger_key a targetname. Lets give it a targetname of key. targetname key
Next we need to specify what item will be needed to trigger the func_rotating and turn it off. You do this by setting the key value pair item to the name of the key. So in this example we would set item=key_data_spinner on the trigger_key entity.
There is one more thing to do and that is there must be a trigger where you want the key to be used that will trigger the trigger_key entity. So we would go to the area we made where the key_data_spinner will need to be placed and put a trigger_multiple right in front of the area. The closer and smaller the better. Then target the trigger_key with the trigger_multiple. In this example we would set target=key for the trigger_multiple.
Below is an example pic of what I was tring the explain above.
Hope this clears everything up for ya. Now this is just one little example. There are unlimited uses for these keys. Instead of turning off a fan the key to make some computers explode. One of the more noticable uses of the keys that is in the id maps was the airstrike, which is just the key_airstrike_target and a trigger_key that triggers the misc_viper_bomb to fly by and a big explosion. I will definitly explain this in a future tutorial.
If you want more then to make it so that more then one item is needed to trigger something then you would just target a trigger_counter that in turn targeted the door or whatever to be triggered. I have put an example of this on the example map. I also included the example I explained above with the fan and the key_data_spinner. As always if you have any other questions please post them in the discussion board.
Return to Tutorials Page...