I don’t know how to do it
Can you send your code here? Or do you have no code?
# Get hero’s current x and y position.
x = hero.pos.x
y = hero.pos.y
# Find the nearest yak. yak = hero.findNearestEnemy() # If the distanceTo the yak is less than 10: if hero.distanceTo(yak) < 10: # To move right, add 10 to hero's x position. hero.moveXY(+ 10) # Use moveXY(x, y) to move! pass
hero.moveXY() needs 2 parameters, you need to be
hero.moveXY(hero.pos.x, hero.pos.y +number
I don’t know python much, but I think you should put the x and the y in the
hero.moveXY(x + 10, y)
I didi the Mighty Sand Yak
Need code for that level?
No, solutions are not allowed on the discourse so its fine
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.