I’ve decided to bite the bullet and learn Python. I’m doing okay so far though I’ve run into a little snag.
I’m currently just trying to set variables for a double jump:
jumped = 0 if space.positive: if jumped == 0: jump() jumped = 1 elif jumped == 1: jump() jumped = 2 elif jumped == 2: if floorTouch.positive: jump() else: pass print jumped
I’m still learning so some of this code may not be great.
When space is pressed it’s setting the ‘jumped’ variable to 1.
My problem is that it’s setting it back to 0 straight away (presumably because it’s looping back through to the ‘jumped = 0’ part?
Any help would be great