I wasn’t giving the “Add” function the actual object to add to the array. Fixed that and now it works fine.
Hi, I have a widget with an animation that simply displays a number ( amount of damage ) for a second over the character’s head. When the animation is complete, the widget should be deleted and never seen again.
I can’t get my widgets to die.
I store them in an array when I create them called ‘DamageWidgets’
Here is the widget graph for the numbers
This is a function I made to easily create a widget on the fly and add it to the ‘DamageWidgets’ array
This is an update function, it’s called on Event Tick. I know it’s very sloppy, but it’s looping through all the DamageWidgets and seeing if the animation is finished, then removes it from the array and calls ‘Remove From Parent’ on the widget. ( I can’t find anything about removing it from the viewport? Does Remove From Parent automatically do that? )
I hope you can help