Basin Stampede Help PLZ

Can anyone tell me what is wrong with my code please?

while True:
    enemy = hero.findNearestEnemy()
    xPos = hero.pos.x + 10
    yPos = 17
    if enemy:
        # Adjust y up or down to get away from yaks.
        if enemy.pos.y > hero.pos.y:
            # If the Yak is above you, subtract 3 from yPos.
            yPos = hero.pos.y - 3
            pass
        elif enemy.pos.y < hero.pos.y:
            # If the Yak is below you, add 3 to yPos
            yPos = hero.pos.y + 3
            pass
    hero.moveXY(xPos, yPos)

can you send the link.

1 Like

try changing to

xPos = hero.pos.x + 5
1 Like

thanks @qwerty , but me and my dad worked it out. @Chaboi_3000 can you please close this topic down as i dont need it anymore

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.