Skip to main content

momentary_rot_button

momentary_rot_button icon
Brush entity

A momentary_rot_button is a brush wheel or lever that turns while a player holds the use key on it, and it moves its target, such as a momentary_door, along with it.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Targettarget

Names the entities it moves, which get its position as a number from 0 at the start up to 1 at the end, with the use type Set. The wheel needs a target, because it doesn't turn without one, and wheels with the same target turn together.

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
Speedspeed

Sets how fast the wheel turns while a player holds the use key, in degrees per second.

If you leave this key empty or set 0, it is 100.

Default 50
Mastermaster

Names a master, and while the master is off, the use key doesn't turn the wheel and its target gets nothing.

Soundssounds

Sets the sound the wheel plays each time a player starts turning it.

The 15 choices
  • None (0)
  • Big zap & Warmup (1)
  • Access Denied (2)
  • Access Granted (3)
  • Quick Combolock (4)
  • Power Deadbolt 1 (5)
  • Power Deadbolt 2 (6)
  • Plunger (7)
  • Small zap (8)
  • Keycard Sound (9)
  • Squeaky (21)
  • Squeaky Pneumatic (22)
  • Ratchet Groan (23)
  • Clean Ratchet (24)
  • Gas Clunk (25)
Default None (0)
Custom soundHalf-Life Unified SDKnoise

Sets a sound file that plays each time a player starts turning the wheel, and if you set one, the wheel ignores Sounds.

Distancedistance

Sets how far the wheel turns from its start to its end, in degrees, and a negative value turns it the other way. The wheel needs a distance, because with 0 it doesn't turn.

Default 90
Auto-return speedreturnspeed

With Auto Return, sets how fast the wheel turns back to its start when the player lets go, in degrees per second, and with 0 it doesn't turn back.

Default 0

Flags​

1Door Hack

The wheel is solid, and players can't turn it with the use key, so it only turns when something triggers it, and each trigger turns it for a tenth of a second

16Auto Return

When the player lets go, the wheel turns back to its start at Auto-return speed and moves its target back with it

64X Axis

The wheel turns around the X axis, the map's east-west line, instead of the vertical axis

128Y Axis

The wheel turns around the Y axis, the map's north-south line, instead of the vertical axis

Notes​

  • Each time a player starts turning the wheel again, it turns the opposite way to last time, so one use opens the door a bit and the next closes it again. With Auto Return and an Auto-return speed set, it always turns toward its end
  • The wheel stops at its start and at its end
  • The turning sound stops when the player lets go of the wheel

See also​

Changes since 1.38​

  • You can use the new keys Custom sound, Object Hint Template and Hint Distance
  • Fixed the Master key doing nothing on button_target, trigger_hurt, trigger_push, trigger_monsterjump, momentary_rot_button and a triggered game_player_equip. These entities never checked their Master, so they worked while locked
  • Fixed the sound of turnable valve wheels and levers continuing to play after you let go of them