How to make buttons
Sometimes you might want to have a button trigger something rather than an activation field or other action by the player. Instead of explaining how to do a button for each tutorial I'm going to explain the basics of the Func\Button entity. It's a rather simple entity that can be easily applied to many different things.

The button itself: 

The Func\Button entity must be applied to a brush. Most of the time you'll probably use a basic square shaped button in your levels but that's not all you can use. Some levels have levers, knobs, cranks, wheels, etc. These are all different uses of buttons. Once you apply the entity to your desired brush, you'll need to set it's properties accordingly. The first field you see is angle. This is where you set what direction the button will move when pushed. This is usually set so the button moves into the wall it's on. The next field is speed. This is of course how fast the button moves after it's pressed. Next is wait. This is the amount of time in seconds that the button waits before popping back out so that you can push it again. If you want your button to be a one time deal then set this to -1. That will make it so the button never pops back out. The next field is lip. This specifies how much of the button sticks out when it's in it's "pressed" mode. Give your button health if you want it to be shot rather than pushed to activated it. you'll probably want this number to be small so that it only takes one shot to activate. The sound field is not really what you think it is. In Quake 1 this allows you to change the sound your button makes. In Quake 2 this allows you to turn sound off or on. There is only one default sound the button uses. So, give sound a value of 1 and the button is silent. Give it any other numerical value and it will play the default sound when activated. The target and targetname fields work the same as for every other entity. Input the name of the object the button activates in the target field and give the button a name in the targetname field for other objects to target it. There aren't any special spawnflgas for button that you need to worry about.

Using a button: 

Now that you know how to setup a button, how do you use it? Simple; enter the targetname of the desired object you want to activate into the button's target field. That's it, you've made a button controlled object.

That's it! Go make some buttons!

Back to index

Copyright ©1998 Bryan Beretta and Lithium Software. All rights reserved. Permission required for
use of any and all material found on or downloaded off this site for purposes other than learning.