Basin Stampede Help


#1

What is wrong with my code?

loop:
enemy = self.findNearest(self.findEnemies())
if enemy and self.distanceTo(enemy) < 10:

     x = self.pos.x
     y = self.pos.y - 10
     self.moveXY(x, y)
 else:
     pass
     x = self.pos.x
     y = self.pos.y + 10
     self.moveXY(x, y)

Please help.


#2

It looks like you’re using the wrong code to try and solve this level.

In Basin Stampede you want to check whether the Yaks are above or below you, and move accordingly. Not move up if they are close, down if they are far.


#3

You may also consider increasing your X value…