Hello,
Coincrumbs is identifying the chest rather than the coin as the nearest item, and running me over traps and damage.
Any tips? None of the other mentions of this had the same issue, that I found (just slow speed, or not doing xyposition right)
while True:
# This finds the nearest item.
item = hero.findNearestItem()
if item:
# This stores the item's pos, or position in a variable.
itemPosition = item.pos
# Put the X and Y coordinates of the item into variables.
itemX = itemPosition.x
itemY = itemPosition.y
# Now, use moveXY to move to itemX and itemY:
hero.moveXY(itemX, itemY)
Here you can see the chest gets marked as item, rather than the lower coin. The hero just shows up towarsd the bottom because he’s hit an explosion and been knocked back there.