Using a timeline Node

Hey everyone,

I am trying to debug my Level up system which shows a UMG Widget displaying stat changes for lets say 5 seconds before removing the widget. This should have been pretty easy to accomplish, but for some reason, I can’t remove the Widget within 5 seconds of adding it to the viewport. Right now I am using a delay for 5 seconds and then removing it from viewport, but I was wondering if I should use a timeline instead. If so, how exactly would I set the timeline up to accomplish this?

Another thing I wanted to ask, what are the alternatives to using the delay? I’ve narrowed my issue down to the delay causing the widget to not be removed even though it executes properly.

Are you using 4.6? If so the Remove from Viewport node is gone, but this should work:

A timeline would work, but I don’t think it’s necessary:

timelines work for simple timing conditions, but problem with your delay is probably where it is.
they don’t and arent’ supposed to work in places and they sometimes mess up game flow, sometimes even being ignored or delaying so long flow skips a node. (especially in widgets)
(the delay you are already using might be working right, put a PrintString after it and experiment with it a bit. placement etc.)

timers work but need to be careful setting them up:

just a lil bit more information to consider besides the info Mosel3y provided

Yes I am using the 4.6 build and I am using the Remove from Parent node (Sorry I must have typed the old name for it). After messing around with this, I still can’t get it to work. The problem seems to be that the remove from Parent Node isn’t removing the Widget from the screen no matter how I connect the widget’s variable.

Can you show a screenshot of your blueprint?

An error I did in the beginning, while struggling with UMG, was to reconstruct the widgets every tick.
The widgets will update, even though you don’t recreate or readd them to the viewport.

I usually create the widgets OnConstruct and only add or remove from viewport when it is actually needed.
Widgets updates on their own, without reconstructing or readding.

Sounds like this might be the problem on your end as well…

I had the exact same problem in my GameJam’s submission few days ago.
I wasn’t able to find a workaround in time so I ended up spawning the widget in LevelBlueprint.

I’ll follow this thread to see if someone comes up with a solution… As Oasf says it probably comes from reconstucting the widget every tick.

I never had any problem with UMG in 4.5, and I made much more complicated widgets blueprints actually, so this really bugs me.