I’ve been stuck on this level for a while now, and have been reading some posts on it and have gotten my code to where my character will collect three gold coins and then stop moving. No idea why this is happening so some help would be appreciated.
This is my code:
coinIndex = 0
while True:
coins = hero.findItems()
while len(coins) > coinIndex:
coin = coins[coinIndex]
coinIndex += 1
if coin.value == 3:
pos = coin.pos
x = pos.x
y = pos.y
hero.moveXY(x, y)
pass