Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

moveXY() problem - Can't move after collecting the coins

def attack():
    enemy = hero.findNearestEnemy()
    if enemy:
def collect():
    coin = hero.findNearestItem()
    if coin:
        hero.moveXY(coin.pos.x, coin.pos.y)
hero.moveXY(58, 15)

while True:

hero.moveXY(60, 20)

Hi, please don’t post the same code in two locations, it won’t get you help any faster and it clutters the forum. Let’s stick to this topic:


That was a mistake, it wasn’t done on purpose :slight_smile: