Map without buttons or triggers is like Sven Co-op without monsters. All the entities with target keyvalue may interact with other entities. That simple mechanics could put some action into your map. Preassure pads opening door, button that calls an elevator, monster spawning when player reach certain point. You will learn some useful features like changing what button or trigger activates or how to "lock" the button/trigger. 1. Make sure you have created room with light and info_player_start.
Button
One of the simplest entity, yet still have a lot of features. You can make light switch as much as pressure pad or button that activates on receiving damage.
1. Turn the brush that will be your button into entity: func_button.
2. Choosing the texture for your button is important, some textures are designed for buttons. Textures which name starts with "+0" or "+A" are related to each other. For example we have textures named "+0BUTTON1" and "+ABUTTON1". First texture represents button that isn't activated yet. As soon as button is activated "+0BUTTON1" changes to "+ABUTTON1" automatically in-game, what gives a nice effect. Texture the button with one of those texture, it's automatically change texture in-game to fit button's state.
3. Newly created entity is highly customizable by setting up keyvalues:
name --> not required. You can trigger a button (button can be a target of other entity). Triggered button activates itself.
target --> the name of entity to be activated after pressing the button. If it's a name of the light, then the light will be toggled after button is pressed. If it's a door, the door gets open after button is pressed e.t.c. delay before trigger --> delay (in seconds) to activate the target after button is pressed. 0 means activate target immediately. kill target --> entity to remove from the world after button is pressed. speed --> speed in which button moves after activation. Works only if don't move flag isn't checked. health --> Normally button can be activated by triggering it, using USE input or touching it. When health is set to more than 0, the button can be activated by receiving a damage. If button health fall below 0, the button is activated. Need an update. lip --> how many units button sticks out of the wall after activated. You can enter negative values to sew the button into wall. Works only if don't move flag isn't checked. master --> name of master entity that locks this button. See "Temporary Disabling Trigger Input (Lock)" tutorial below. sounds --> sound playing when the button is activated. delay before reset --> time (in seconds) for button to be reactivated and allowed to be activated again. Button also gets back to it's starting position if don't move flag isn't checked. -1 means button can't be used again. locked sound --> the sound playing when player attempt to open the locked button. The button can be locked by setting up a master entity. It is playing among normal button sound. unlocked sound --> the sound playing when button gets activated after being unlocked. locked sentence --> name of announcer sentence to be played after attempting to activate a locked button. unlocked sentence --> name of announcer sentence to be played after unlocking activation.
4. Now let's go into "flags" tab:
don't move --> button won't move. toggle --> button can be freely opened and closed. Disables "delay before close" function, anyway delay before close must be different than 0. sparks --> button produces spark effects, the same as in env_spark entity. touch activates --> you can touch a button to activate it when this flag is checked.
5. If don't move flag isn't selected the button moves into the position of Yaw value:
Use the circle on the right top corner to determine in which direction the button should move. Zero means it move in positive X direction. The circle represents top (x/y) view of the editor. You can choose DOWN/UP direction from drop-down list under the circle.
Rotating Button
Trigger
Momentary Synchronized Button
Door as a Type of Button
Change Trigger Output or Disabling it's Functionality
Temporary Disabling Entity Functionality (Lock)
Multiple Input Requirement (Two Buttons for One Door)
Trigger from Path Entities (Train, Monsters e.t.c.)
|
|