# Help - How to collect coins with mimic pet?

I want to collect all 4 coins and to carry them to the top left X sign.
This code fails:

``````function onSpawn(){
pet.moveXY(67, 11);
pet.moveXY(64, 44);
pet.moveXY(44, 58);
pet.moveXY(20,58);
pet.moveXY(10,58);
}
pet.on("spawn", onSpawn);
``````

And this code is an ugly patch and succeeds:

``````function onSpawn(){
pet.moveXY(67, 11);
var n = 0;
while (n++ < 5)
pet.moveXY(64, 44);
n = 0;
while (n++ < 5)
pet.moveXY(44, 58);
n= 0;
while (n++ < 5)
pet.moveXY(20,58);

pet.moveXY(10,58);
}
pet.on("spawn", onSpawn);
``````

But this is a trial and error method. Can someone give a more â€śscientificâ€ť approach? How many coins can mimic carry? How long is the carry distance ?

Click on pictures to see animation

The ummm â€śscientificâ€ť approach would be to not tell the mimic pet of all pets to collect coins. The mimic pet is not meant to collect coins - the coins are attracted to them. What you should do is to follow your pet to the end (while killing the munchkins) and get near it to collect the coins. For example, remember this:.

(sorry this should have the quote marks around it but I donâ€™t know how to put them )
Here you could send the mimic pet to get them. If they end up in the nearby trees. Nothing it just happened to me.
In conclusion, the mimic pet does not collect the coins but is attracted by them. I know it might seem like a lot of work to go follow them as we are all after simpler solutions to CoCo and life, but in my opinion, you will have to follow.

Elijah

P.S. the mimic can carry unlimited coins. I tried it for Cloudrip Brawl and it was amazing.
P.P.S. The mimicâ€™s carry distance might not be so unlimited - you might have to ask @Deadpool198 or @Chaboi_3000 if you want to know.

Thank you.

1 Like

Itâ€™s not the amount of coins that matters, or the distance, but the speed. If youâ€™re mimic pet streaks along on a straight line he will lose the coins. Thatâ€™s because (I think) the mimicâ€™s ability is based on physics so the each coin will have a certain force of attraction to the mimic and if the mimicâ€™s travelling to fast away they will fall behind.
I used the mimic in backwoods treasure and almost beat level 9, but there just wasnâ€™t enough gold in total, you have to go in the boxes yourself. Anyway, the mimic pet worked ok there because I was turning lots of corners. Thatâ€™s important. Because your hero is going a very direct way there are no big corners, which isnâ€™t that good because your mimic will lose the coins.
Either you could use pet.say("") as waits, or, the better option, you could go right up the top right corner before turning left, then I think youâ€™d keep all the coins.
This isnâ€™t a tried and tested theory but I have had quite a lot of experience wit the mimc and I know it can collect without any weird stuff .
Danny

4 Likes