[SOLVED] Help with lvl "slalom" in cloudrip

Help! i am stuck
I really need help

Can you pls post the code here in correct format.

1 Like

oh i just reloaded it like 10 seconds ago

but that doesn’t matter 'cause i did basically nothing i don’t understand how to use boots of leaping

or how all this works in this lvl

I tried continueing the code but i move 2 the 1st gem and then stop here is my code

gems = hero.findItems()

while hero.pos.x < 20:
	# move() takes objects with x and y properties, not just numbers.
	hero.move({'x': 20, 'y': 35})
    
while hero.pos.x < 25:
    # A gem's position is an object with x and y properties.
    gem0 = gems[0]
    hero.move(gem0.pos)

# While your x is less than 30,
# Use an object to move to 30, 35.
while hero.posx < 30:
    hero.move({'x': 30, 'y': 35})
    # While your x is less than 35,
    # Move to the position of gems[1].
    gem1 = gems[1]
    hero.move(gem1.pos)
# Get to the last couple of gems yourself!

well i kind of fixed it but the problem is i move into another trap here is my code
You might not see the difference but there is one, an extra line, empty but “vital”

# Use object literals to walk the safe path and collect the gems.
# You cannot use moveXY() on this level! Use move() to get around.
gems = hero.findItems()

while hero.pos.x < 20:
	# move() takes objects with x and y properties, not just numbers.
	hero.move({'x': 20, 'y': 35})
    
while hero.pos.x < 25:
    # A gem's position is an object with x and y properties.
    gem0 = gems[0]
    hero.move(gem0.pos)

# While your x is less than 30,
# Use an object to move to 30, 35.
while hero.posx < 30:
    hero.move({'x': 30, 'y': 35})
    
while hero.pos.x < 35:
    # While your x is less than 35,
    # Move to the position of gems[1].
    gem1 = gems[1]
    hero.move(gem1.pos)
# Get to the last couple of gems yourself!

ah i solved it i think i was missing the “.” in “.pos.x”

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.