Hi i need help with the mighty sand yak if anyone could help me thanks.
# Let yaks get close, then move 10m right to dodge.
# Dodge 4 yaks to complete the level.
while True:
# 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(x, y)
# Use moveXY(x, y) to move!
hero.moveXY(28,30)
if hero.distanceTo(yak) < 10:
hero.moveXY(15,30)
pass