Momentary rotating button example

Half-Life HL
Momentary rotating button example by The Mad Carrot
Posted 8 years ago2009-11-30 12:26:13 UTC • Examples • Half-Life
Loading...
Screenshot Thumbnail
Name
Momentary rotating button example
By
The Mad Carrot The Mad Carrot
Type
Map
Engine
Goldsource
Game
Half-Life
Category
Examples
Included
BSP, BSP
Created
8 years ago2009-11-30 12:26:13 UTC
Updated
8 years ago2009-11-30 12:30:51 UTC
Views
2229
Downloads
626
Comments
2
Download

Remember the dish in Uplink Extended? The dish is a momentary_rot_button. You can rotate it with the turnwheel which is also a momentary_rot_button. When the dish is in the correct allignment, a light flicks on, and a button is enabled. How does the dish know when it's in the correct allignment?

It's done using another momentary_rot_button, not visible to the player. This momentary_rot_button is just a flat brush with a func_pushable sitting on top of it. When the dish rotates, this momentary_rot_button moves to the right, carrying the pushable along with it.

A trigger_pushable can trigger things, provided that the Pushables flag is checked. By using 3 trigger_multiples, you can trigger stuff when the pushable brush goes through them. The trigger_multiple can then trigger things like a light or a sound to tell the player the momentary_rot_button is in the correct position.

In this example map, i have a momentary_rot_button which rotates the needle of a gauge. When the needle enters the red part of the gauge, a red light flicks on and a button is enabled (the pushable touched the second trigger_multiple). When the needle leaves the red part, the light is turned off and the button is disabled (the pushable touched the third trigger_multiple).

When you turn the turnwheel the other way, the same thing happens. Needle enters red part, pushable touches second trigger_multiple, light and button are enabled. Needle leaves red part, pushable touched first trigger_multiple, light and button are disabled.

There is however one slight issue when rotating the turnwheel the other way, there's a slight delay at wich the light and button should enable/disable, causing the light and button to enable when the needle is already in the red part, and the light and button will disable when the needle has already left the red part.
I don't think there's a fix for this, it's just how the momentary_rot_button works.
You'll understand when you try it yourself.

Note: the transparent green and red brushes are not part of the contraption and are just there to show the location of the trigger_multiples ingame.

2 Comments

Commented 8 years ago2009-12-01 00:13:03 UTC Comment #4429
Nice example map. thumbs up
Commented 8 years ago2009-12-03 10:02:22 UTC Comment #4434
I remember long time ago, you personally sent me this. Now, all the rest who do not know, knows. thumbs up :D

You must log in to post a comment. You can login or register a new account.