I have 2 characters. Both have some health points. If one guy shoots opponent, opponents health goes lower. Now when the health reaches below 0 by one of the guys he should get a widget and the pawn should be destroyed.
So far I managed to get the widget working, but not the destroying.
On AnyDamage Event the health variable changes and fires notify, in notify the HealthWidget changes, so everyone can see health go down. Then if health is below 0, I get the owner (=Contoller) and send message to create widget, then destroy actor. But it doesnt destroy anything.
If I replace the red part with just destroy actor it will work. But I still need the widget.
Btw. It all happens on Character
I dont know what to do.
Please Help
Ok, so the actor is dying before the widget is shown… Presumably, if you put up the widget and have a short delay before destroying the actor, that would work. I’m not a multiplayer expert though…
Delay is now allowed in functions. And it doesnt even go into the IF branch. So it is not creating widget.
And the IF is needed, because widget can only be assigned to local controllers