Hi. I need some help. I am trying to create a swimming game and I am trying to calculate the distance of the swimmer. I have got that part working (on the picture called ‘progress distance’ everything up to the Branch is fine), but what I am struggling with is, I want to create a levelling up system based on how far they have swam. I was thinking for example that for every 5000m the player would move up a level. The problem I am having is when the player reaches the distance (which I have called Max Distance) I can’t get the distance to reset to zero and start calculating again. I have tried a couple of ways, one of them being I thought I would just try and increase the Max Distance every time the player levelled up, but then my progress bar would only ever go back to 50% (for example the player reaches 5000m, I doubled the Max Distance to 10000m but the progress bar started at 50%) The one I have attached here hits the Max Distance, starts to recalculate, but then doesn’t recognise the Max Distance again.

I’m sure there is a much easier way to do this and would really appreciate if someone could help.

thanks

I’m sure there is a much easier way to do this and would really appreciate if someone could help.

thanks