Skip to main content

func_rot_button

func_rot_button icon
Brush entity

A func_rot_button turns around its origin, set with an origin brush, when a player uses it, shoots it or touches it, and fires its targets. It turns back after its delay.

While its master keeps it locked, a use plays Locked Sound and Locked Sentence, and once it is unlocked, a use plays Unlocked Sound and Unlocked Sentence.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Nametargetname

Triggering the entity turns it like a player does, but not with the flag Touch Activates. See Common keys.

Locked Soundlocked_sound

Sets the sound the entity plays when a player tries to use it while its Master locks it. A door also plays it when a player touches it and it only opens when triggered.

  • None (0)
  • Access Denied (2)
  • Small zap (8)
  • Buzz (10)
  • Buzz Off (11)
  • Latch Locked (12)
Default None (0)
Unlocked Soundunlocked_sound

Sets the sound the entity plays when it is used while it isn't locked. A button plays it when it is pressed, and a door when it starts to open.

The 12 choices
  • None (0)
  • Big zap & Warmup (1)
  • Access Granted (3)
  • Quick Combolock (4)
  • Power Deadbolt 1 (5)
  • Power Deadbolt 2 (6)
  • Plunger (7)
  • Small zap (8)
  • Keycard Sound (9)
  • Buzz (10)
  • Latch Unlocked (13)
  • Lightswitch (14)
Default None (0)
Locked Sentencelocked_sentence

Sets an announcer sentence group the entity speaks when a player tries to use it while it is locked. Each try plays the next sentence of the group, at most one every few seconds.

The 10 choices
  • None (0)
  • Gen. Access Denied (1)
  • Security Lockout (2)
  • Blast Door (3)
  • Fire Door (4)
  • Chemical Door (5)
  • Radiation Door (6)
  • Gen. Containment (7)
  • Maintenance Door (8)
  • Broken Shut Door (9)
Default None (0)
Unlocked Sentenceunlocked_sentence

Sets an announcer sentence group the entity speaks when it is used while it isn't locked. Each use plays the next sentence of the group.

The 9 choices
  • None (0)
  • Gen. Access Granted (1)
  • Security Disengaged (2)
  • Blast Door (3)
  • Fire Door (4)
  • Chemical Door (5)
  • Radiation Door (6)
  • Gen. Containment (7)
  • Maintenance area (8)
Default None (0)
Custom locked soundHalf-Life Unified SDKFeaturefullocked_sound_override

Sets a sound file that plays instead of Locked Sound while the master locks the button.

Custom unlocked soundHalf-Life Unified SDKFeaturefulunlocked_sound_override

Sets a sound file that plays instead of Unlocked Sound when the button is used.

Custom locked sentenceHalf-Life Unified SDKFeaturefullocked_sentence_override

Sets the name of a sentence group of sound/sentences.txt, such as NA, which the entity speaks instead of Locked Sentence.

If you leave this key empty, the entity speaks Locked Sentence.

Custom unlocked sentenceHalf-Life Unified SDKFeaturefulunlocked_sentence_override

Sets the name of a sentence group of sound/sentences.txt, such as EA, which the entity speaks instead of Unlocked Sentence.

If you leave this key empty, the entity speaks Unlocked Sentence.

Object Hint TemplateFeaturefulobjecthint

Shows brackets around the object for players near it. Within Hint Distance, the brackets are faint and in the HUD color. When the player is close enough to use the object and looks at it, the brackets take the color of the choice.

  • None (empty) - No brackets
  • button - Yellow, and orange while a master locks the object
  • charger - Green, and red while the charger is empty
  • eyescanner - Yellow
  • pickup - Yellow
Default None (empty)
Hint Distanceobjecthint_distance

Sets how far from the player's eyes the faint brackets show, in units, up to 4096. The object must be in front of the player and in sight.

If you leave this key empty or set 0, the distance is 512 units.

Move withSpirit of Half-Lifemovewith

Names the parent, an entity that this one moves and turns with. The entity keeps the place and the angles it has on the parent in the editor. If several entities have the name, the first one counts. A name ending in .1 to .4 puts a sprite or a model that isn't solid on that attachment point of the model of the parent. A solid brush on a parent that turns needs its own origin brush. Moving objects explains it all.

If you leave this key empty, the entity doesn't move with anything.

Axis locksparentflags

Keeps some of the entity's own position or angles instead of following the parent. Add up the values of the axes to keep: 2 for X, 4 for Y, 8 for Z, 16 for pitch, 32 for yaw and 64 for roll. So 112 keeps the entity level. 0 follows the parent on every axis.

Default 0
Targeted objecttarget

Names the entities to trigger when the button is used, or when it turns back with Toggle, with the use type that Use type sets.

Mastermaster

Names a master, and while the master is off, the button is locked, so a use plays its locked sound and fires nothing.

Speedspeed

Sets how fast the button turns, in degrees per second, and 0 means 40.

Default 50
Healthhealth

Sets whether players shoot the button instead of using it. Above 0, any damage turns it, and players can't use it with their use key.

Soundssounds

Picks the sound the button plays when it is pressed.

  • Squeaky (21)
  • Squeaky Pneumatic (22)
  • Ratchet Groan (23)
  • Clean Ratchet (24)
  • Gas Clunk (25)

If you leave this key empty, the button plays no sound.

Default Squeaky (21)
Delay before resetwait

Sets how many seconds the button stays turned before it turns back and can be used again, and 0 means 1 second.

  • Stays pressed (-1) - The button stays turned for good
Default 3
Delay before triggerdelay

Sets how many seconds pass between the use and the firing of Targeted object.

Default 0
Distancedistance

Sets how far the button turns, in degrees.

If you leave this key empty or set 0, it doesn't turn, but it still fires its targets.

Default 90
Trigger before moveFeaturefultrigger_before_move

Names the entities to trigger when the button starts to turn.

Trigger on returnFeaturefultrigger_on_return

Names the entities to trigger when the button is back where it started.

Target when lockedFeaturefultarget_on_locked

Names the entities to trigger when a player uses it while its master keeps it locked, at most every 2 seconds.

Use typeFeaturefulusetype

Sets the use type that Targeted object gets.

  • Off (-1) - Targeted object gets Off
  • Toggle (0) - Targeted object gets Toggle
  • On (1) - Targeted object gets On
  • On/Off (2) - With Toggle, On when the button turns and Off when it turns back
  • Off/On (3) - With Toggle, Off when the button turns and On when it turns back
Default Toggle (0)
Wait before toggling againFeaturefulwait_toggle

With Toggle, sets how many seconds pass before players can use the button again.

Custom soundHalf-Life Unified SDKnoise

Sets a sound file that the button plays instead of the Sounds choice.

Player use policyFeaturefuldirectuse

Sets how a player must look at the button to use it.

  • Default (0) - As for any object
  • Direct only (1) - The player must look straight at the button
  • Not through walls (2) - The player can't use the button through a wall
Default Default (0)

Flags​

1Not solid

Players, monsters and shots pass through the button

2Reverse Dir

The button turns the other way

32Toggle

The button stays turned after a use, and the next use turns it back, so Delay before reset isn't used

64X Axis

The button turns around the X axis instead of the vertical axis

128Y Axis

The button turns around the Y axis instead of the vertical axis

256Touch Activates

A player who touches the button turns it, and the use key and triggers do nothing

16384Player Can't UseFeatureful

Players can't press the button with their use key, but shooting it, touching it and triggers still work

Notes​

  • A scripted_sentence can make the button speak, and the sentence then plays from the button
  • Each player can turn the object hints off, or keep only the hint on what their use key would use, with the client setting cl_objecthint

See also​

Changes since 1.38​

  • You can use the same new keys as on func_button and the new flag Player Can't Use
  • A scripted_sentence can make a button speak, as in the Half-Life 25th Anniversary Update. In SBO 1.38, only monsters spoke
  • The button plays its locked and unlocked sounds and sentences. In SBO 1.38, a func_rot_button played none of them