Is this how you would implement a lives counter?

Would you implement a lives counter in a similar manner?

Thank you.

I would consider either having the BP trigger volume directly update the HUD lives value via a reference to it, or have an event dispatcher within the BP trigger volume that the HUD can bind to (better IMO).

To be honest though, I’m not entirely sure it would make a significant difference. I typically don’t like using Tick but this is what property bindings typically do anyways.

I agree with the tick, I was thinking in having a interface to message my UI and also the gameinstance but I don’t know if I can add interfaces to the gameinstance…Need to further investigate I guess.

@SgtFlexxx

I followed your suggestion, I updated the lives in my GameInstance within my Killbox, and then I added an EventDispatcher and called it in the HUD.

By the way, I also tried using Bind from the HUD, and it worked, but I found that Bind operates similarly to the Tick event, so I decided not to pursue that route.

Here’s a quick video demonstrating it in action.
https://youtu.be/uYsAhDj6Hb8