Widget Button Blinking When Cursor Hovers Over it

Ok so I am trying to make it so when you click on an object, a little quiz pops up. I am making the quiz work by swapping the buttons and images when you click the buttons so I don’t have to make a bunch of widgets. Although I haven’t gotten very far because the first button sometimes works and most of the time doesn’t. I press play and sometimes it works like a button. I press play and most of the time it blinks while I am hovering over it, making it impossible to click it. But still clickable if you click at the right time.

So I will have 2 images. One is showing how I made it so I can click on actors and the other is how I am making the quiz widgets showing up. The code in these images are in the level blueprint.

I have tried swapping out the widget with a widget that works and I still run into the same problem so I am pretty sure it is not the widget itself. Maybe I should use a Remove Parent node instead of a Remove All Widgets node but I don’t know what the target would be. How to call the current widget to remove it. And I think they are the same but I am not sure.

Anyways how do I make it so I can click on an object, a widget pops up creating a quiz with buttons that can be clicked?

Just to add, I hooked up the widget somewhere else and its works. So I know its not the widget. It has to be something in the level code or I am just hooking everything up wrong, right?

Ok so I figure it out. Boy do I feel dumb, the event tick was constantly firing the widget so thats why it was blinking. There was a constant stream of widget creations.

So I fixed it by adding a gate of sorts so that the constant firing will stop effecting the widget. I am sure there is a better way of doing this but what I did was I made a boolean variable to be stored in the character blueprint. Then When I left clicked something, the variable would be true but only for a split second. That gives the code enough time to go through the other parts. Which is if what you click is the first aid object and the boolean I made was true then the widget will come online. And since the boolean will only be true for a split second, only 1 quiz will be online. Instead of a constant stream of re-creating the quiz. Check the images for more clarity.

1 Like