Pet not fetching potion

Why won’t I “eat” the potion? I am not dead at this stage and the pet is at me, yet for a few seconds with me still being alive I don’t say the usual “I feel GREAT!!!”
Screen Shot 2021-05-05 at 10.06.32 AM

Have you used pet.fetch(), or pet.moveXY()? Maybe you need to make the pet move to your exact position, rather than either next to you, or where you were when the pet moved.

I’ve used

potion = pet.findNearestByType("potion")
if potion:
    pet.fetch(potion)

Ok I’ll try making the pet move to my pos

i tried that, it didn’t work

I’ve put it in a function. THis is the function, and I’ve called it.


def onSpawn(event):
    enemy = hero.findNearestEnemy()
    
    while True:
        enemies = hero.findEnemies()
        potion = pet.findNearestByType("potion")
        if potion:
            pet.fetch(potion)
            pet.moveXY(hero.pos.x,hero.pos.y)

but in other the kithgard brawl you helped me with, the one with the fire traps, fetching potion worked…