x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

alt text

[2]: /storage/temp/261978-to-click-objects.jpg

Product Version: UE 4.20
Tags:
to-open-quiz.jpg (137.9 kB)
more ▼

asked Dec 11 '18 at 08:35 PM in Blueprint Scripting

avatar image

Milantique
21 3 4 5

avatar image Milantique Dec 11 '18 at 08:48 PM

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?

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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. alt text

fix-1.jpg (85.9 kB)
fix-2.jpg (110.7 kB)
more ▼

answered Dec 12 '18 at 07:09 PM

avatar image

Milantique
21 3 4 5

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question