How to have heart system that shows half hearts

I am creating a health system with hearts. I want the hearts to display as full, then half full, then empty. Currently I have only managed to have it show three types of hearts so far, Full left side heart, Full right side heart and empty right side


But with the code I’ve been using from a tutorial it can only replace the hearts with the right empty one:


How can I change this to be able to display the empty left side heart after having shown an empty right side one?

I have used a boolean to switch between two different “Set Brush from Textures” which allow me to change from empty right to empty left.


But for some reason if I lose more health it breaks the correct sequence.



What is happening that causes this?