Help with making a repeat untill?

help
ideas
howtos
helpwithcode

#1

I'm making a game and I want to add a breath meter, but I cant seem to make the right code for it. My code so far is:


#2

Have a Emoji and draw a redline from left to right with another emoji.
When y position of fish is less than (surface)
Draw a trail from right to left the background color
slowly.
When fish y position is higher than surface draw trail from left to right in red


#3

The breath block looks like this


And it has to stop when my value breath is 1


#4

When you reach the surface draw a colored line in the forward direction.


#5

Can you please explain it a little bit more? I don't get it right now. (Maybe you can add some pictures?)


#6

Sorry, going to sleep now.
Simply draw a red line from left to right.
Then from right to left draw a white line so the red line is deleting
When the emoji drawing the white line touches the emoji at the start of the red line. The fish drowns.