how to get bandages and when pressing enter i get the health but only if i have enouf bandeges

hey i want to create a thing in my game called BANDAGES. this is a collectible item and there is a label sayin how many i have.
so what i want to do is that if i press enter, i get 1 health/heart and the counter of bandages go down every time i press enter until there are no more bandages. and whene i have no more bandages and i keep pressing enter the health will keep not go higher.
@“JR 01” @PixelPizza @meburningslime @browngr

@JR 01 @PixelPizza @meburningslime @browngr

can you all help me

I know how but I have to ask a singular question which can effect the outcome

do you want to star with 0 or start with a couple of bandages?

Please leave a link to the game

here it is
@glithctyrus i want 0 at first

Try this:

@KA11561 I need to ask one more question: do you want there to be a limit?

I-I have been defeated

@JR 01 thx
@glichtyrus no but i pick them up

i can make one were the recwired amount is based on the damage. so do you want to know.

thats what jr01 coded in the screen shot

@splash2018 no its fine

@everybody its fine


@JR 01 it doent work look

when i press enter my health doesnt go up

thats because he gave the inventory part of it

i ment you cant heal one side of your body at all if you dont have anuf bandeges to finish healing it.

and get rid of that less than 0 and just use the fail output from greater than -1

That’s why I had a filter at the end, I wasn’t sure how you were going to add health (like by connecting the bundles or sending a message).

If you have it in the “All” bundle, then add 1 after the filter: (Delete the Orange wire)

If you make it greater than 0 (instead of -1), the bandages will never display 0 on the screen.
Also the Less than 0 is so you dont get Negative bandages, I advice putting that back in.

oops i ment greater than 0.