UMG Holding Input Won't Reset

Hello! Quick question, in UMG i have several menus in one blueprint, when I press the bottom face button it presses a UMG button and a new menu activates, however if i HOLD DOWN the bottom face button it was continue pressing buttons infinitely. Is there a way to set it so one has to press the face button fresh for each input?

Do you mean how to make it that only one thing happens when it is pressed? (It only runs once per click?)

yes! exactly that

You can simply make a do once code when the button is pressed. Make a on released button that resets the do once. This should work.

not exactly, the problem is that it’s pressing multiple buttons rapid fire.

i will press a button, a new menu will appear and the user focus will be set to another button, and then that button is instantly pressed if the face-button is still held down.

Are you using a on clicked or on pressed?

on pressed, because i’m using a controller for the input

If your widgets are all somehow relative to each other, you could add a bool variable called CanClick which is set to true when a button is pressed. Make it so that the pressed code will only run if CanClick is false. Inside event tick, do a is mouse down. If false, set CanClick to false. This should work.

Sorry, instead of is mouse down, use your input key for pressing

Actually, the input part would not work. You could try doing all of the above code inside the player character, and when the buttons are pressed cast to Player Character → get CanClick etc.

Hope this makes sense

yeah i figured that would probably do the job, but i was really hoping there was a way to just limit inputs within UMG, you’d really think this problem would have been solved because every console game ever made in unreal would have this issue

I completely agree. Seeing how Epic made a game like Fortnite, you would think they would have made a better way to do it.
I’ll sum up my answer for others with this problem.

Make a variable inside of your player character (bool) called CanClick. When the button is pressed, check CanClick is false, run the code before setting CanClick to true. Inside of the player character, if the input button for pressing is not down, set CanClick to false.