loop:
enemy = self.findNearestEnemy()
if enemy and self.distanceTo(enemy) < 20:
newX = self.pos.x - 4
newY = self.pos.y
self.moveXY(newX, newY)
else: newX = self.pos.x + 4 newY = self.pos.y self.moveXY(newX, newY)
loop:
enemy = self.findNearestEnemy()
if enemy and self.distanceTo(enemy) < 20:
newX = self.pos.x - 4
newY = self.pos.y
self.moveXY(newX, newY)
else: newX = self.pos.x + 4 newY = self.pos.y self.moveXY(newX, newY)
I guess we also thought youâd use 10
for the distance check instead of 20
. Maybe that was the difference?
Following the instructions doesnât work. I am using Anya with the leather boots and the +5 glasses.
loop:
enemy = self.findNearestEnemy()
if enemy and self.distanceTo(enemy) < 10:
# Move to the left by subtracting 10 from your X coordinate.
newX = self.pos.x - 10
newY = self.pos.y
self.moveXY(newX, newY)
else:
# Move to the right by adding 10 to your X coordinate.
newX = self.pos.x + 10
newY = self.pos.y
self.moveXY(newX, newY)
I canât figure out how to make it maintain the levels when pasting.