Kill widget on start up

G’Day! just a quicky! - I have a widget in a blueprint which has a widget class. is it possible to kill the widget (or class) on start up (run) then create on mouse click?

Thanks anyone!! :slight_smile:

What do you mean by kill the widget? Remove the widget from screen? Then what are you supposed to click?

ah well. The widget has an animation timeline… some text moves around.

The Blueprint it is placed into is a mesh object which has animated parts. When the mesh object is clicked, its parts animate and I want the widget to appear and run its own text animation.

I did figure out how to hide the widget until the mesh was clicked (toggle visibility) , but that doesn’t do it for me, as the widget animation runs even when hidden.

So, I figured the best solution is to not have the widget exist until the mesh object is clicked. But… can’t figure out how to do that!

Hope you are not sorry you asked! :slight_smile:

It has been some time since I worked with widgets like that, but you can reset the animation when clicked. However, you might want to simply remove it after the animation is done, then spawn a new one after the actor has been clicked. Can you show me some screenshots?

of course! Thanks for taking the time!

S1 - is basic mesh animation
S2 - is is simply the play anim for the widget
S3 show my ‘time hidden’ fudge!

These any help I wonder!?

Is there a reason for why you can not remove the widget after it has completed its animation? Just add a delay in the anim mesh actor that corresponds to the length of the animation? Or if you dont want it to automatically disappear you have to remove it when the actor loses focus somehow.

You can read the delay time, or animation duration, from the animation itself. That way the delay will wait longer or less depending on the length of the new animation you put in.

You could also call a function in the anim mesh actor from the widget asking it to remove the widget.

I need the set up to be flexible - as the animation timings may change. So mainly the problem is I don’t want to see the Widget (or animation) when first run - only when the mesh is clicked - then when the ‘mesh’ animation is finished, I need to remove the widget from view.

If you see what I mean…

ahhh … now, as I am clearly new to this … you have stumbled into a trap… I just haven’t been able to figure out how to find (call) the animation in the Widget from within the mesh Blueprint! grrr… any tips on that would be great! And… do you think just hiding the widget at run is good enough?

right… it seems the set up I have here - I just need to reset the animation in the widget when I toggle its visibility! - could be closer than I think!?