Func rot button: Difference between revisions
Jump to navigation
Jump to search
m (link) |
No edit summary |
||
Line 45: | Line 45: | ||
==Flags== | ==Flags== | ||
*1 : Not solid | *1 : Not solid - This button does not collide with anything. | ||
*2 : Reverse Dir | *2 : Reverse Dir - This button rotates in the opposite direction. | ||
*32 : Toggle | *32 : Toggle - This button toggles between pressed and released. | ||
*64 : X Axis | *64 : X Axis - This button rotates on the X axis. | ||
*128 : Y Axis | *128 : Y Axis - This button rotates on the Y axis. | ||
*256 : Touch Activates | *256 : Touch Activates - Collision with this button triggers it. | ||
*512 : Damage Activates | *512 : Damage Activates - Damage to this button triggers it. | ||
*1024 : Use Activates | *1024 : Use Activates - Using +use on this button triggers it. | ||
*2048 : Starts locked | *2048 : Starts locked - This button spawns locked - This means it cannot be pressed. | ||
==Inputs== | ==Inputs== |
Revision as of 11:57, 7 November 2007
Entity Description
A brush entity that is designed to be used for a rotating player-useable button. When used by the player, it rotates to a pressed position.
Availability
Template:In game Template:Game-base Template:In code
Keyvalues
- Template:Kv targetname
- Template:Kv parentname
- Template:Kv origin
- Template:Kv angles
- Template:Kv global
- master
- <string> Legacy support: The name of a master entity. If the master hasn't been activated, this button cannot be used.
- speed
- <integer> The speed that the button rotates, in degrees per second.
- health
- <integer> Legacy method of specifying whether or not the button can be shot to activate it. Use the 'Damage Activates' spawnflag instead.
- sounds
- <choices> Sounds.
Literal value Description 0 None (Silent) 21 Squeaky 22 Squeaky Pneumatic 23 Ratchet Groan 24 Clean Ratchet 25 Gas Clunk
- wait
- <integer> Amount of time, in seconds, after the button has been pressed before it returns to the starting position. Once it has returned, it can be used again. If the value is set to -1, the button never returns.
- distance
- <integer> The amount, in degrees, that the button should rotate when it's pressed.
- _minlight
- <string> The minimum level of ambient light that hits this brush.
Flags
- 1 : Not solid - This button does not collide with anything.
- 2 : Reverse Dir - This button rotates in the opposite direction.
- 32 : Toggle - This button toggles between pressed and released.
- 64 : X Axis - This button rotates on the X axis.
- 128 : Y Axis - This button rotates on the Y axis.
- 256 : Touch Activates - Collision with this button triggers it.
- 512 : Damage Activates - Damage to this button triggers it.
- 1024 : Use Activates - Using +use on this button triggers it.
- 2048 : Starts locked - This button spawns locked - This means it cannot be pressed.
Inputs
- Lock
- Lock the button, preventing it from functioning.
- Unlock
- Unlock the button, allowing it to function.
- Press
- Activate the button as if it was pressed.
- PressIn
- Activate the button as if it was pressed, sending it to the bottom position.
- PressOut
- Unpress the button, sending it to the top position.
Outputs
- Template:O targetname
- Button:
- OnDamaged
- Fired when the button is damaged.
- OnPressed
- Fired when the button is pressed.
- OnUseLocked
- Fired when the button is used while locked.
- OnIn
- Fired when the button reaches the in/pressed position.
- OnOut
- Fired when the button reaches the out/released position.