I recently found out that using Number Converter components on the Simple Button component defeats its purpose, as the Number Converter always outputs a 1 in case the button is ever pressed, and never goes back to outputting a 0. I have a component that takes Floating Point inputs and I wanted to connect it to the Simple Button.
An alternative I tried is using a Condition block, which it would check if the input was 1, and output a 1, otherwise output a 0. But even the output of that has the same behavior or being stuck at 1.
What other solution can I use to get a Float conversion for the Simple Button?
This is the expected behavior of the Button Simple component. It only ever outputs the value 1 whenever the button is pressed. It will never output a 0, regardless of whether a Number Converter is used. However, there is also the Button Bi-state component. This acts like a toggle and switches between outputting 0 and 1.
There is also the Button Clicked Released Events which outputs 1 when you press the button and 0 when you release it.
That makes 3 button types with different behaviour depending on what you need.
Another alternative could be to use the “Simple button” followed by a “Bypass” component with special action “Reset to zero after timeout”.
When pushed, the simple button would output “1”, which would be forwarded by the Bypass component, but after some configurable timeout, the Bypass component would emit a “0”.