Use integers to call events?

I’m trying to have my games health bar switch to a new image based on the characters health (0-10), so I set up 10 overlapping health images in the HUD widget BP.

My plan was to make one image visible at a time, based on the amount of health the player has.

If the player has 7 health, an event called “7” would fire in the widget BP and hide all other images besides 7 health. This is the idea, I just can’t figure out how to call events based on a variables value.

Any ideas on how I can implement this, or is there an easier way? Thank you.

Use either “Switch by Int” node, which is for execution routing, or even better “Select” node which is for passive varable routing allowing you to assign image widgets to ints. Speaking of assignments, you can also use arrays to do so and get image widget from array using integer index.

Thank you so much for your help. I still have one small problem with the setup, maybe you could check out my latest question if you get a chance haha.