momentary_rot_button

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:
- Naming and triggering: Name
- Position: Pitch Yaw Roll
- Appearance: Render FX, Render Mode, FX Amount and FX Color
- Compiler keys of brush entities: all of them
targetNames 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.
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
None (empty)objecthint_distanceSets 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.
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.
parentflagsKeeps 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.
0speedSets 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.
50masterNames a master, and while the master is off, the use key doesn't turn the wheel and its target gets nothing.
soundsSets the sound the wheel plays each time a player starts turning it.The 15 choices
None (0)Sets a sound file that plays each time a player starts turning the wheel, and if you set one, the wheel ignores Sounds.
distanceSets 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.
90returnspeedWith 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.
0Flags
1Door HackThe 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 ReturnWhen the player lets go, the wheel turns back to its start at Auto-return speed and moves its target back with it
64X AxisThe wheel turns around the X axis, the map's east-west line, instead of the vertical axis
128Y AxisThe 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
momentary_door- a door that follows the wheelfunc_rot_button- a rotating button that you press once- momentary_rot_button on TWHL - the Half-Life entity
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_buttonand a triggeredgame_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


