Making a button that can be held down and released without momentary_rot_button?

I want to make a button that needs to be held down. I need it to send outputs both when it has been pressed and when its’ released. I remembered the rotating wheels in Half Life 2, and tried to copy what they did. However, momentary_rot_button appears to be broken in Portal 2, which is real shame; it appears to have been exactly what I wanted :cry:. Instead of moving while held and returning to its’ position when released, the button moves for a bit, and then returns even if the button is held. Spamming it allows the player to push it further, but its’ original function of being a button you hold on to rotate is missing in Portal 2.

Is there another way to do this? Or will I have to abandon this and try something else? I could do something different, but it would really decrease the quality of my map…

Not sure about a proper way to do it, but a creative workaround:

Create a prop, make it invisible (func_physbox or render mode color alpha 0), and set it to OnPlayerPickup, and OnPlayerDrop… Wouldn’t have to hold E but they’d have to hold it. Something like that perhaps.

I thought of that. Since you have to press +use twice, and releasing does nothing, it seems like it’d be more confusing then anything. I may as well just have a toggleable button. I appreciate the thought, though.

Does onin do anything?

Have you tested it in a different source have to confirm that it is actually brighten in portal 2 ?

@Sally: What is onin?

@KingPommes: Yes. In fact, I even directly copied a functional one from a decompiled HL2 level, and saw the exact same issue. An excessive amount of features seem to be broken in Portal 2, so I’m honestly not surprised.

OnIn is an output the func_button can do, it also has an OnOut

That just toggles the button though. He wanted a way to hold down e which is why I suggested using a prop.

What about you make it a “pressure plate” instead? If the button is to be held down you won’t be able to move away aswell. And the trigger output “onstartouch” “onendtouchall” should work. Make a small func_door that moves up and down depending if you stand inside the trigger or not. The basic cube pressure plates should work the same…