Please or Register to create posts and topics.

Underground Timer

Page 1 of 2Next

This is an instance of a robust underground timer. This timer can count up or down from 1 - 99 seconds.

underground_timer_counter.vmf

  1. The $UnEvent_Relay parameter is the event that is fired when the timer has stopped counting. This event should be triggered in one of the clock instances.
  2. This instance is used for both buttons, however the buttons will determine whether it counts up, or down.

underground_timer_but_countdown.vmf

  1. $time_units is the number of seconds of the unit column
  2. $time_tens is the value of the tens column (This is the only way I could figure this out for the countdown timer without adding some sort of script.)
  3. The $Event_Relay parameter is the event that is fired when the timer has started counting. This event should be untriggered in the clock instance.
  4. Please note: I have added entities that will work out the number of seconds the counter needs to count down from $time_units and $time_tens, hence the large amount of logic_cases

underground_timer_but_countup.vmf

  1. The $Event_Relay parameter in the 'Timer instance' is the event that is fired when the timer has started counting. This event should be untriggered in the clock instance.
  2. The $time parameter should be set to how many seconds it should count up to

Known Bugs:

  1. Putting both 0 and 0 for the left and right number icons will cause a rip in space, however this shouldn't happen as you wouldn't want a 0 - timed counter

How to place in your map:

  1. Create a func_instance and change the vmf path to "underground_timer_counter.vmf"
  2. Name this instance
  3. Create another func_instance and then change the path to one of the button paths (either underground_timer_but_countup.vmf or underground_timer_but_countdown.vmf depending if you want it to count up or down)
  4. Set the button's fixup name value to the same of the counter instance
    1. If you are using the countup instance, put a number value for the replace value $time to how many seconds you want the counter to count up to
    2. If you are using the countdown instance, put the individual values with each a 1 digit number which will represent your double digit number. e.g. "$time_tens 1" and "$time_units 5" will make the timer count down from 15
  5. Using the $Event_Relay replace value in your button, make it point towards a logic_relay which will trigger the event when the counter starts. This must include the name of the prefix PLUS the name of your relay otherwise it will not work. e.g. clock_1-TRIGGERNAME (This is the name of your relay outside the instance)
  6. Using the $UnEvent_Relay replace value in your counter instance, make it point towards a logic_relay which will un-trigger the event when the counter stops. Same as the button's relay this MUST INCLUDE the prefix fixupname as well as the name of your relay. e.g. clock_1-UNTRIGGERNAME (This is the name of your relay outside the instance)
  7. Enjoy the use of an underground timer... WOOOT

If you are having trouble...
Please do not hesitate to ask for any help either through a PM to myself or by posting a comment inside the instance thread.

File Name: Underground Timer Instance.7z
File Size: 5.21?KiB
Underground Timer

?????????????????????????????TWP Releases | My Workshop

It's been a while since you crafted this thing, but hopefully you'll still remember it's inner-workings well enough to help me out :).

The need I have for a current project is just a 5 second countdown timer. It needs to be with a floor button, and hold the timer at the max value until it is unpressed (so the features it activates can be used indefinitely with a box on the button). If there is a built-in New Test Chamber themed timer (the little orange dial that I think I've seen?) that's easier to use, that would suit my needs just fine.

If not, then I'll probably be trying to modify/recreate your setup to do what I need. Unfortunately, I can't even get the $Event_Relay parameter replaced correctly. I've got it typed in according to my best interpretation of the instructions:

On the button:

$Event_Relay clock_1-light_bridge_1_relay_1

On the counter:

$Event_Relay clock_1-light_bridge_1_relay_2

where "clock_1" is my Fix Up Name (with Entity Name Fix Up set to 'prefix') for both the button and the counter, "light_bridge_1_relay_1" enables a light bridge and "light_bridge_1_relay_2" disables it.

The timer counts down from whatever I set it at, but the relay doesn't trigger at the beginning or the end. I set up another light bridge with the relay enabling from the counter and disabling from the button with no effect either. I'm sure the problem is that I'm inputting the new value for the parameter incorrectly, but I couldn't really find a place that was clearly addressing "Event_relay".

I also don't know what the parameter $UnEvent_Relay is used for on the counter.

One last thing, the button instance file names "countup" and "countdown" seem to be reversed?

Thanks for any help you offer.

Get the latest version of:
Climbing Companion

Of course I find how to do a timer under the indicator lights tutorial on the Valve wiki just after writing this, but I'd still be interested to know what I'm doing wrong when trying to use your timer.

Get the latest version of:
Climbing Companion

I may have wrote this a little wrong and I checked out the instances and realised they were reversed. I bet you could just rename them both and it will be fine.
I also wrote '$Event_Relay' instead of $UnEvent_Relay for the counter instance.

Thanks for pointing these things out and I will re-upload my instances and change the thread accordingly.

As for your triggers not activating, I'll give an example:
The prefix of your button and counter instance is clock_1. The $Event_Relay parm is Relay1 and the $UnEvent_Relay parm is Relay2. The REAL name of the relays should be clock_1-Relay1 and clock_1-Relay2.

As for activating the timer when on a button, you will have to edit my instance and replace the prop_under_button with a prop_under_floor_button plus incorporate some kind of logic_branch that will only activate the timer once you depress the button. I will make an example of this and upload it as an attachment to this post later on if you need it.

holdbuttons.zip

EDIT: I highly suggest you re download the newest version. I have fixed the bug where if you have more than one of the clock instances at one time, they both count at the same time.

?????????????????????????????TWP Releases | My Workshop

Thanks a bundle dude.

I haven't actually looked to see what "hold buttons" does, but I'll be needing one that (ideally):

*With no button interaction - has the completed countdown displayed (either zero, "x" or some other indicator)
*With person/box on button - has the full countdown amount displayed (in this case, 5 seconds)
*When person/box leaves button - begins countdown, deactivating the entities upon completion

I'll be playing around with your new version as soon as I get some time.

EDIT: Either you already understood these needs, and I misunderstood your description of the new instance; or your timer goes all the time unless someone is standing on it?

Get the latest version of:
Climbing Companion
KillerBeeGees wrote:
EDIT: Either you already understood these needs, and I misunderstood your description of the new instance; or your timer goes all the time unless someone is standing on it?

If you downloaded the hold buttons in my attachment:
The timer will display the number of seconds when you stand on it, when you move off the button it will start the countdown. I think it automatically changes the timer back to the full number of seconds so the player knows how long the timer will go for. If you go on the button before it finishes counting down, it will reset the timer.

?????????????????????????????TWP Releases | My Workshop

I am wondering if it is possible to use your instance without the buttons. I am wanting to use your timer to show the total amount of "power" available from an instance I am creating. It would be a percentage and, since your instance can obviously show up to "99", I figure I could trigger your countup timer from my instance. I just don't know exactly how I would do that.

Wow! That was...uh, yeah. Just, yeah.

Well if you generally know how to work it, you could activate it using an output (or better idea, hide the button inside a wall somewhere and make the output point towards the button which will 'press' it)

The counters counts up from a logic_timer every second. If you really wanted to, you could get rid of the timer and just add 1 to your counter panel) through an output. If you are a noob at instances (which I am guessing no offence) you would edit this though the io_proxy within the clock instance (not the buttons).
Add an output to the proxy and put 'OnProxyRelay' -> 'Whatever I named the counter' -> 'add' -> '1'

?????????????????????????????TWP Releases | My Workshop

No offense taken, but I am not a noob at instances. This is just a somewhat complicated instance I am making as it involves some strange logic. Plus, it is rather late so my brain isn't really working well at the moment.

Regardless, I can see what you mean about the timer. The primary reason why using a button (even a hidden on) wouldn't work is because the final instance will be trigger by a falling object passing through portals.

Wow! That was...uh, yeah. Just, yeah.

hello, I want to activate the timer with a func_door_rotating, but this func_door_rotating have a lot of outputs, what I was trying to do... (I want to make a countdown) is activate the button and the door_rotate at the same time, but it doesn't work, I used a func_button and with invisible texture, Is it possible to do what i'm trying? I hope somebody can help me, thanks

Page 1 of 2Next