Pet Fetch Bug, not passing potion to moving hero

When playing Medic School I decided to add a goldstorm so I had something to do while waiting for mushrooms to spawn. But, at times the pet.fetch doesn’t actually bring the item to me. The pet runs to me, but I move away and he doesn’t actually give me the potion. Not sure what exactly is happening in the fetch code.

My pet did come near me, but before I took the potion I moved away and he returned to his spot. I’m guessing:

  1. he got in range to say “I’m here”
  2. I moved out of range to take the item
  3. an attempt was made to pass the item, but I was too far away.
  4. he assumed the potion had been passed

I was using pender with ring of speed.

Maybe it’s related with changes in fetch. @Catsync could you look this please?

I fixed a few oddities in the fetch code, and also because of those fixes, was able to make the level’s default onHear() code better. See if any of that helps?

I tried having a fast hero outrun the pet, but it still seemed to drop off the potions okay. The change in onHear() should fix one issue where the Hero says “Aaarg” and the pet’s returning with the potion would get interrupted by that hear event.

Still having issues:

In this case, he delivered the potion to me, but I didn’t regain health. He doesn’t appear to be carrying it anymore, but he thinks he is carrying something.

Here is my sessionID:

Generated random seed 3016092072 of type submissionCount from sessionIDs 581a74e037e4502400215d3c submissionCount 4

Ok, there was a problem where the Wolf would drink the potion instead of fetch it when moving fast :slight_smile: That should be fixed now. Might need to clear cache to get the fix.

The other issue seems to be fixed if you make the change to onHear():

    if startsWith(event.speaker.id, "Exp"):
        potion = pet.findNearestByType("potion")
        if potion:
            pet.fetch(potion)
            pet.moveXY(28, 34)
1 Like