Please or Register to create posts and topics.

How do I make a button that toggles by pressing 'e'?

Specifically, I want to stop a prop_button from automatically resetting and only rest by the player pressing 'e' on it. So now the button is an on/off switch.

I think I could make it so that the OnPressed will trigger some kind of logic setup for the door that will switch between which output (open or close) it will fire next time the button is pressed. Is that the best way to do it, and which logic entities do i need to use?

You shouldn't worry about making the switch, visibly, stay in the pressed position. Off the top of my head, you could use a logic_branch to create this effect. Look in my signature and download the "Gel" example, I do exactly what (I think) you are talking about in that example map. VMF is included.

But I have to ask, wouldn't a floor button be better suited as an On/Off switch though? That is pretty much their entire purpose.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

Your Gel map has exactly what I was looking for. And I didn't want to use a floor button because it would require an unnecessary cube, and pressing a button is much more efficient in my opinion than placing a cube on a button. Thank you.