A
momentary_rot_button is a rotating button that requires continuous use (e.g. holding the USE key) to slowly affect the position of a target
momentary_door
over time.
If the "Auto-return" flag is checked, the button (and the target door) will move back to their initial position when it is stopped being used. Otherwise it will toggle between opening and closing on each use.
The way
momentary_*
entities work is via synchronizing the percentage between close and open positions across all linked entities, meaning a
momentary_rot_button
rotated halfway through its travel distance moves the associated
momentary_door
likewise halfway to its open position.
The target
momentary_door
will also actuate all other
momentary_rot_buttons
that target it. This can be used to make a "momentary rotating door" by having its "door hack" checked. Then have both entities target a dummy hidden
momentary_door
. A "door hacked"
momentary_rot_button
is solid but not USE-able, and vice versa.
momentary_rot_buttons
are also used by
func_mortar_field
for targeting air strikes, one for each axis.
For the normal rotating button, see
func_rot_button
.
Attributes
- Name (targetname) - Property used to identify entities.
- Pitch Yaw Roll (angles) - Sets the pitch (up / down), yaw (left / right) and roll (bank) respectively. The compass in WorldCraft / Hammer corresponds to Yaw. The settings are not always (or not all) used.
- Render FX (renderfx) - Gives objects special render effects. Think of it as modifying whatever the Render Mode puts out. The options are as follows:
- 0 = Normal
- 1 = Slow Pulse
- 2 = Fast Pulse
- 3 = Slow Wide Pulse
- 4 = Fast Wide Pulse
- 5 = Slow Fade Away
- 6 = Fast Fade Away
- 7 = Slow Become Solid
- 8 = Fast Become Solid
- 9 = Slow Strobe
- 10 = Fast Strobe
- 11 = Faster Strobe
- 12 = Slow Flicker
- 13 = Fast Flicker
- 14 = Constant Glow
- 15 = Distort
- 16 = Hologram (Distort and Fade)
- Render Mode (rendermode) - Controls the type of rendering that is used for an object. Options are:
- 0 = Normal
- 1 = Color
- 2 = Texture
- 3 = Glow
- 4 = Solid
- 5 = Additive
- Master (master) - The name of a
multisource
(or game_team_master
) entity. A master must usually be active in order for the entity to work. Thus they act almost like an on/off switch, in their simplest form, and like an AND gate in the case of the multisource
. Note: momentary_rot_buttons
can always be used, regardless of the state of their master.
- Targeted Object (target) - Normally, the
momentary_door
you want to control.
- FX Amount (renderamt)
- FX Color (rendercolor)
- ZHLT Lightflags (zhlt_lightflags)
- Light Origin Target (light_origin)
- Speed (speed) - Speed the button will turn.
- Sounds (sounds) - sounds values
- 0 = None (
common/null.wav
)
- 1 = Big zap & Warmup (
buttons/button1.wav
)
- 2 = Access Denied (
buttons/button2.wav
)
- 3 = Access Granted (
buttons/button3.wav
)
- 4 = Quick Combolock (
buttons/button4.wav
)
- 5 = Power Deadbolt 1 (
buttons/button5.wav
)
- 6 = Power Deadbolt 2 (
buttons/button6.wav
)
- 7 = Plunger (
buttons/button7.wav
)
- 8 = Small zap (
buttons/button8.wav
)
- 9 = Keycard Sound (
buttons/button9.wav
)
- 21 = Squeaky (
buttons/lever1.wav
)
- 22 = Squeaky Pneumatic (
buttons/lever2.wav
)
- 23 = Ratchet Groan (
buttons/lever3.wav
)
- 24 = Clean Ratchet (
buttons/lever4.wav
)
- 25 = Gas Clunk (
buttons/lever5.wav
)
- Distance(deg) (distance) - Distance in degrees the button will rotate.
- Auto-return speed (returnspeed) - Speed at which the button will return to its starting position after being used.
- Minimum Light (_minlight)
Flags
- Door Hack (1) - Makes this entity solid, but un-USE-able (and vice versa). Thus the only way to actuate this entity is for it and another, normal
momentary_rot_button
, share a momentary_door
target. So that button moves the door, and that door in turn moves this "hacked door".
- Not useable (2) - Button must be triggered to work.
- Auto return (16) - Button returns to its starting position automatically after use at the speed set in Auto-return speed (returnspeed).
- X axis (64) - If enabled, the rotation will be on the X axis.
- Y axis (128) - If enabled, the rotation will be on the Y axis.
Notes
- Non-solid by default, unless ☑️ Door Hack (1) flag is checked. (Note that "door hacked" entities are not USE-able.)
- If neither of the axis flags is enabled, rotation will default to the Z axis.
- An origin brush needs to be part of the entity to specify its axis of rotation.
- A
momentary_rot_button
or momentary_door
cannot be disabled by disabling its master.
- It is possible to unlink this button from its door with a
trigger_changetarget
. Linking it to a door again will snap that door into place, depending on the position of the button.
- Setting Pitch Yaw Roll (angles) rotates the entity by that amount on spawn. Use this together with X/Y axis flags to orient the entity to rotate off-axis.
- A helpful comparison between
momentary_rot_button
and func_rot_button
is as follows:
Aspect |
func_rot_button |
momentary_rot_button |
Movement |
rotates around origin |
rotates around origin |
Pitch Yaw Roll |
rotates the entity by that amount on spawn |
rotates the entity by that amount on spawn |
Target |
Anything (e.g. func_door ) |
momentary_door or func_mortar_field |
Use type |
Instant |
Continuous |
Make toggleable |
☑️ "toggle" flag |
☐ "Auto return" flag and return speed == 0 |
Make resettable |
After wait time and ☐ "toggle" flag |
☑️ "Auto return" flag and return speed > 0 |
Target timing |
At end of movement |
Continuous with movement |
-
A solid "door hacked"
momentary_rot_button
would have weird collision round its edges due to the vertical clip distance generated for it (36u standing/18u crouching) being different than the horizontal (16u). You can add zhlt_noclip 1
keyvalue to remove the default clip generation, then tie to the entity a clip brush extended uniformly at the edges (say, 27u) with CLIPBEVEL texture round the edges.
- Auto-returning
momentary_rot_buttons
have a tendency to skip the final update, leaving the target momentary_door
slightly ajar. This need to be accounted for when designing the momentary_door
.
- A targeted
ambient_generic
will modulate its pitch to the relative position of the momentary_rot_button
. However this is only transient and activating the ambient_generic
any other way will reset to its set pitch values. The previously mentioned issue also tend to leave the ambient_generic
at very low droning pitch instead of turning it completely off.
Team Fortress Classic only
Attributes
- Target (target) - When an entity is activated, it triggers the entity with the name specified by Target.
- Pitch Yaw Roll (angles) - Sets the pitch (up / down), yaw (left / right) and roll (bank) respectively. The compass in WorldCraft / Hammer corresponds to Yaw. The settings are not always (or not all) used.
- Render Mode (rendermode) - Controls the type of rendering that is used for an object. Options are:
- 0 = Normal
- 1 = Color
- 2 = Texture
- 3 = Glow
- 4 = Solid
- 5 = Additive
- Render FX (renderfx) - Gives objects special render effects. Think of it as modifying whatever the Render Mode puts out. The options are as follows:
- 0 = Normal
- 1 = Slow Pulse
- 2 = Fast Pulse
- 3 = Slow Wide Pulse
- 4 = Fast Wide Pulse
- 5 = Slow Fade Away
- 6 = Fast Fade Away
- 7 = Slow Become Solid
- 8 = Fast Become Solid
- 9 = Slow Strobe
- 10 = Fast Strobe
- 11 = Faster Strobe
- 12 = Slow Flicker
- 13 = Fast Flicker
- 14 = Constant Glow
- 15 = Distort
- 16 = Hologram (Distort and Fade)
- Targetname of teamcheck goal (teamcheck) - Using this in conjunction with an info_tf_teamcheck allows you to switch the entity's team allegiance when the info_tf_teamcheck changes its team setting. The team_no property must be set to Any (0) if you use this value.
- Has item # (items_allowed) - The player must be carrying this item to use this entity. Set 0 to ignore this criterion.
- Has item from group # (h_i_g) - The player must be carrying any item from this group to use this entity. Set 0 to ignore this criterion.
- Hasn't item from group # (hasnt_item_from_group) - To use this entity, the player must not be carrying any item from this group. Set 0 to ignore this criterion.
- If item # has moved (if_item_has_moved) - A player can only use the entity if this item is not in its original spawn location. Set 0 to ignore this criterion.
- If item # hasn't moved (if_item_hasnt_moved) - A player can only use the entity if this item is in its original spawn location. Set 0 to ignore this criterion.
- If goal # active (if_goal_is_active) - Players can only use the entity if this goal is in the active state. Set 0 to ignore this criterion.
- If goal # inactive (if_goal_is_inactive) - Players can only use the entity if this goal is in the inactive state. Set 0 to ignore this criterion.
- If goal # removed (if_goal_is_removed) - Players can only use the entity if this goal is in the removed state. Set 0 to ignore this criterion.
- If group # active (if_group_is_active) - A player can only use the entity if all the goals in this group are in the active state. Set 0 to ignore this criterion.
- If group # inactive (if_group_is_inactive) - A player can only use the entity if all the goals in this group are in the inactive state. Set 0 to ignore this criterion.
- If group # removed (if_group_is_removed) - A player can only use the entity if all the goals in this group are in the removed state. Set 0 to ignore this criterion.
- Affect all on Team (maxammo_shells) - This allows an entity's effects (giving ammo, taking health, etc.) to be performed on an entire team rather than just the Activating Player. Options are:
- 0 = Disabled
- 1 = Blue
- 2 = Red
- 3 = Yellow
- 4 = Green
- Affect all not on Team (maxammo_nails) - This allows an entity's effects (giving ammo, taking health, etc.) to be performed on all players in teams other than the one selected, ignoring the Activating Player. Options are:
- 0 = Disabled
- 1 = Blue
- 2 = Red
- 3 = Yellow
- 4 = Green
- If all goals in group # active... (all_active) - When activated, the entity will check to see if all goals in a given group are active. If so, it will activate another goal, which is specified by last_impulse.
- Remove goal # (rv_g) - When the entity is activated, it will remove the goal specified here.
- Restore goal # (rs_g) - When the entity is activated, it will restore the goal specified here.
- Inactivate goals in group # (inactivate_group_no) - When the entity is activated, it will deactivate all the goals in the group specified here.
- Remove goals in group # (rv_gr) - When the entity is activated, it will remove all the goals in the group specified here.
- Restore goals in group # (rs_gr) - When the entity is activated, it will restore all the goals in the group specified here.
- Remove Spawn point # (remove_spawnpoint) - On activation, the entity will remove the info_player_teamspawn entity with the Goal # entered here. While the spawnpoint is removed, no one can spawn there.
- Restore Spawn point # (restore_spawnpoint) - On activation, the entity will restore a removed info_player_teamspawn entity with the Goal # entered here. After being restored, players can once again spawn at the spawnpoint.
- Remove spawn group # (rv_s_h) - On activation, the entity will remove the group of info_player_teamspawn entities with the Goal Group # entered here. While the spawnpoints are removed, players cannot spawn at them.
- Restore spawn group # (rs_s_h) - On activation, the entity will restore the group of removed info_player_teamspawn entities with the Goal Group # entered here. After being restored, players can once again spawn at the spawnpoints.
- Item to give (items) - Note: There are exceptions (check SmartEdit names). The Item # of an item_tfgoal entity. When the entity is activated, the Activating Player will be given this item. If the item is already being carried by a player, it will be taken from the carrier and given to the Activating Player.
- Remove item from APA (axhitme) - The Item # of an item_tfgoal entity. When the entity is activated, if the Activating Player is carrying the specified item, it will be removed from him. What happens to it then is determined by the Goal Activation property of the item.
- Master (master) - The name of a multisource (or game_team_master) entity. A master must usually be active in order for the entity to work. Thus they act almost like an on/off switch, in their simplest form, and like an AND gate in the case of the multisource.
- Name (targetname) (targetname)
- FX Amount (1 - 255) (renderamt)
- FX Color (R G B) (rendercolor)
- ZHLT Light flags (zhlt_lightflags)
- Minimum light level (_minlight)
- Team allowed to activate entity (team_no)
- Player class allowed to activate entity (playerclass)
- Effect radius, 0=infinite (t_length)
- If criteria fails activate Goal# (else_goal)
- ...activate goal# (last_impulse)
- Activate goal# (activate_goal_no)
- Inactivate goal# (inactivate_goal_no)
- Activate goals in group# (activate_group_no)
- Return item # (return_item_no)
- Remove items in group # (r_i_g)
- Add/Subtract frags (frags)
- Add/Subtract lives (lives)
- Add/Subtract health (health)
- Armor Value % (armorvalue)
- Armor Class (armorclass)
- Add/Subtract shells (a_s)
- Add/Subtract nails (a_n)
- Add/Subtract rockets (a_r)
- Add/Subtract cells (a_c)
- Add/Subtract detpack (ammo_detpack)
- Add/subtract grenades #1 (no_grenades_1)
- Add/subtract grenades #2 (no_grenades_2)
- Invincibility duration (invincible_finished)
- Invisibility duration (invisible_finished)
- Quad duration (super_damage_finished)
- Rad Suit duration (radsuit_finished)
- Score to AP team (count)
- Teamcheck team point gain (increase_team)
- Blue point gain (increase_team1)
- Red point gain (increase_team2)
- Yellow point gain (increase_team3)
- Green point gain (increase_team4)
- Owned by-for msg & item glow (owned_by)
- Owned by teamcheck (owned_by_teamcheck)
- Death type (deathtype)
- Message to all (b_b)
- Message to AP (message)
- Message to AP team (b_t)
- Message to non-AP team (b_n)
- Message to owner team (b_o)
- Message to non-owner team(s) (non_owners_team_broadcast)
- Console msg. to all, %s = AP name (n_b)
- Console msg to AP team (n_t)
- Console msg. to non-AP team (n_n)
- Console msg. to owner team (n_o)
- Speak (global) (speak)
- Speak (AP) (AP_speak)
- Speak (AP team) (team_speak)
- Speak (non-AP team) (non_team_speak)
- Speak (owner team) (owners_team_speak)
- Speak (non-owner teams) (non_owners_team_speak)
- Speed (speed)
- Sounds (sounds)
- Distance (deg) (distance)
- Auto-return speed (returnspeed)
0 ≥ x ≥ 1
range)[2024-06-05]
This is common knowledge amongst pro mappers but the momentary_* setup is used on Uplink and Blue Shift for the dialing-in sequences through an off-the-playable-area setup where the momentary_doors push a
func_pushable
through severaltrigger_multiples
that have "pushables" flag set. One of them is the "correct, dialed in" position, the others unset it.One very basic application for this that I can think of is replicating HL2 Route Kanal sliding gate setup locking at its open position by having a
trigger_once
at the very end of the momentary_door, and when the func_pushable touches it, kills the momentary_* entities and replaces them withfunc_wall_toggles
of the setup frozen at their final positions.