Half-Life Entity Tutorials
Update: May 27, 2000
Visit another func_* Entity Tutorial
func_button - by Tiger
Func_Button
Description
The func_button entity allows you to make a useable button :). The button can be used to trigger an event when it is touched or used. When the button is touched or used, it will move in the direction set by its angle, for a length equal to its own length. Following is a list of its important properties.
Key Value Action Description
targetname
string
name It's the name so that other entities can target it
speed
integer
Speed This is the speed the button will move from its non-activated to its activated state.
target
string
Targeted entity When the button is touched or used, this event will be activated.
health
integer
Health (shootable if > 0) If the button has to be shot rather than touched or used, specify a value here. When this amount in damage is reached, the button's targets will be activated.
master
string
master You can specify a multisource master here.
wait
integer
Delay before reset This is delay between when the button is used and when it is once again usable.
delay
integer
Delay before trigger This is delay between when the button is used and the button's events are activated.
spawnflags
1
Don't move If this is enabled, the button will instantly go from inactive to activated when it is touched or used without moving.
32
Toggle If this flag is enabled, the button will pause in its active and inactive position, waiting to be touched or used again. Each time it is activated, it will activate its events.
64
Sparks If this is enabled, the button will randomly emit sparks when it is in its inactive position.
256
Touch activates If this is enabled, it will be possible to activate the button simply by touching it rather than using the "use" key on it.
For the Rendering Properties please check this tutorial.
Using Possibilities
You can use this entity if you needs a visible trigger to open a door or activate a camera. Also check this camera and this door tutorial.