so, the code is set up to go to the first two objects but by the time i get to the first object the gem moves into the trap and then im stuck forever because no matter how i move, i can’t go to the first object without moving the gem into the trap.
1 Like
post code please (20 character)
1 Like
# 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 your x is less than 35,
# Move to the position of gems[1].
# Get to the last couple of gems yourself!
this code puts me in the trap in the first place and its the starting code.
that’s weird, with the starter code for me, it doesn’t do that
Can you send a screenshot please?
Ah i see the problem, you equipped the mimic pet, unequip it then try again
haha! it works! thank you for the help. #meme “I don’t get it. I don’t get it! Ooooooooohhhh now I get it.” LOL
thats almost always the case when you don’t get something in programming.
1 Like
tick on the most solutions on this post
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.