#Save the reference after creating, and

1 messages · Page 1 of 1 (latest)

blazing oriole
#

If anything I can set up a dm or vc to dive a bit more if you feel comfortable @sleek pike

south swallow
#

drag from Return Value from CreateWidget and Set HealthBar

#

then Add to viewport and now it should work

blazing oriole
south swallow
#

what does Initialize do inside widget and how do you spawn your character?

hoary wigeon
#

if on respawn you're creating a new pawn it's going to lose that reference to that UI Widget, you need to remove the widget when the pawn is destroyed and then create a new one when it's created

#

or you could get all widgets of class

sleek pike
#

Oh, Qwigs is right, its not the same pawn

#

So call destroy widget on EndPlay, if i'm not mistaken

blazing oriole
hoary wigeon
#

Event Destroyed for a pawn (actor)

blazing oriole
#

Oh okay I see, so ugh...I just create the function just remove all widget...I don't know if that's also a way or not, but it seems to work theheck @hoary wigeon @sleek pike

hoary wigeon
#

you can remove the referenced widget on destroy on the pawn

#

it'd be better to get all widgets and target the (one?) HUD class you're using than remove all widgets

blazing oriole
hoary wigeon
#

this is on your gamemode, remove the widget on your pawn

#

using the reference to it

#

when On Destroyed fires on the pawn

blazing oriole
#

By pawn do you mean by in the thirdperson blueprint? If so I think I'm probably in the right place isn't it?

#

I'm like mega confused now sorry