Problem when clicking buttons in a widget

Hello, I created a widget with 3 buttons and set the buttons for specific functions within the game. The buttons are inside the same Panel. When I click on a button sometimes the other is fired without having clicked on this other button. Sometimes it happens also by clicking on any of the buttons, they do not respond. Can someone help me with this problem?

need more information here to help you, need blueprint image and UMG

126264-widget.png

Here are the pictures. Thank you for helping me. I tried to put the jump button in another Panel separate from the other buttons but I was not successful either.

how do you know its the buttons not working correctly?

Have you put breakpoints on the click event handlers to ensure they are being called when expected?

I cant see anything wrong with your event handlers so I expect if you are not getting the results you expect then the problem is with your logic elsewhere.

In fact, I did not put the breakpoints in the click event handlers to ensure that they are being called when expected. Honestly, I do not know how to do that. I think this should be the problem.

Actually, the buttons work. It turns out that sometimes I click the Turn Left button, for example, and it does not respond, or when I press the Turn Left button and the Turn Right button goes off. This happens with any of the three buttons (Turn Left, Turn Right and Jump).

so is that after trying the breakpoints? (you add them by right clicking on the event “OnPressed(TurnLeft)” and selecting Add breakpoint

) then the game will stop when it gets to that point in code.

If this still happens I can only think that something in the BP is corrupt trye deleting the events and or the buttons and re-adding them (remember to save you work first…) or try the OnClick events and see if they have the same effect as I never tend to use the OnPressed.

We were able to solve the problem! Thank you so much!

what was the issue?

can you post the solution so other who find this might find it useful and also can you mark as answered if I helped resolve the issue.

Cheers

I did exactly what you recommended. But I made some minor changes. I created a variable and a function and called this function. The character will only turn left or right if the button is clicked. When the button is released I disable the variable.

126330-button+turn+right+released.png