S&box Wiki

Revision Difference

ent_button#547601

<title>ent_button</title>⤶ ⤶ # ent_button⤶ ⤶ A generic button that is useful to control other map entities via inputs/outputs.⤶ ⤶ In code, it is defined in the `ButtonEntity.cs` file under `addons\base\code\Entity\Hammer`.⤶ ⤶ ## Keyvalues⤶ ⤶ **Name (`targetname`)** ⤶ ⤶ >* The name that other entities refer to this entity by.⤶ ⤶ **Tags (`tags`)** ⤶ ⤶ >* A list of general purpose tags for this entity, for interactions with other entities such as triggers.⤶ ⤶ **Move Direction (`movedir`)** ⤶ ⤶ >* Specifies the direction to move in when the button is used, or axis of rotation for rotating buttons.⤶ ⤶ **Move Direction is Expressed in Local Space (`movedir_islocal`)**⤶ ⤶ >* If checked, the movement direction angle is in local space and should be rotated by the entity's angles after spawning.⤶ ⤶ **Movement Type (`movedir_type`)**⤶ ⤶ >* Movement type of the button.⤶ ⤶ **Distance (`distance`)**⤶ ⤶ >* Moving button: The amount, in inches, of the button to leave sticking out of the wall it recedes into when pressed. Negative values make the button recede even further into the wall.⤶ ⤶ **Speed (`speed`)**⤶ ⤶ >* The speed at which the button moves, in inches per second or degrees per second.⤶ ⤶ **Return Speed (`returnspeed`)**⤶ ⤶ >* The speed at which the button returns to the initial position. 0 or less will function as the 'forward' move speed.⤶ ⤶ **Reset Delay (-1 stay) (`reset_delay`)**⤶ ⤶ >* Amount of time, in seconds, after the button has been fully pressed before it starts to return to the starting position. Once it has returned, it can be used again. If the value is set to -1, the button never returns.⤶ ⤶ **Activation Sound (`unlocked_sound`)**⤶ ⤶ >* Sound played when the button is pressed and is unlocked.⤶ ⤶ **Locked Activation Sound (`locked_sound`)**⤶ ⤶ >* Sound played when the button is pressed and is locked.⤶ ⤶ **Toggle (`toggle`)**⤶ ⤶ >* If enabled, the button will have to be activated again to return to initial position.⤶ ⤶ **Momentary (`momentary`)**⤶ ⤶ >* If enabled, the button will have to be held to reach the pressed in state.⤶ ⤶ **Use Activates (`activationsettings#0`)**⤶ ⤶ **Damage Activates (`activationsettings#1`)**⤶ ⤶ **Starts Locked (`spawnsettings#0`)**⤶ ⤶ **Non Solid (`spawnsettings#1`)**⤶ ⤶ **Shadow Casting (`enable_shadows`)**⤶ ⤶ >* Whether this entity should cast shadows or not.⤶ ⤶ **Skin (`skin`)**⤶ ⤶ >* Some models have multiple versions of their textures, called skins.⤶ ⤶ **Body Groups (`bodygroups`)**⤶ ⤶ >* Some models have multiple variations of certain items, such as characters having different hair styles, etc.⤶ ⤶ **World Model (`model`)**⤶ ⤶ >* The model the entity should use⤶ ⤶ **Color (RGBA) (`rendercolor`)**⤶ ⤶ >* The color tint of this entity.