Please or Register to create posts and topics.

Timed Floor Buttons

I've been looking for this, but I can't find out how to make a prop_floor_button countdown when released so the object the button activates will turn off when countdown is finished. Can someone write how?

I understand that the entity activated by the prop_floor_button is deactivated by the button's output OnUnPressed, right? In that case you would just need to add the timer interval at the bottom of the outputs tab (i.e. After a delay of ... or so).

Now about a timer sound ... I can't give any Input.

Could this be what you're looking for?

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Look, you can't use delay, because, when the button is pressed then right afterwards released then pressed again, the second time pressing doesn't stop the delay countdown so it will turn off even though pressed unless you wait the delay before pressing again, and I don't want that to happen.

Quote:
Could this be what you're looking for?

I'm talking about prop_button_floor, not prop_button.

I see your point. Do the following:

Add a logic_timer that is enabled, set the refire interval, and add an output OnTimer that deactivates the entity that is activated by the button.
Then add two outputs to your button: 1. On Pressed -> activate entity; 2. OnPressed -> logic_timer ResetTimer.

That should work the way you want it to.

You'll also want to enable the timer when the button's pressed and disable it when it finishes its countdow, otherwise it'll reset itself and keep going in a loop.

Falsi sumus crusto!

Well, I've made somewhat similiar in my upcoming map. So, I've copypasted it in a little test map and edited for your request. In this map I deactivate a laser grid by the floor button and have it activated in 5 seconds after the button is released. There are countdown checker and sound as well. You can edit it for your need replacing laser with whatever you want and changing time interval. If you have any question feel free to PM me.

God bless the quick save's inventor...(Portal: Prelude)

Alright, thanks.