Are different coins different types?


#1

I’ve seen the posts about finding gold coins based on their item.value. This works well for a hero collecting coins. If I want to use the Mimic, I’m stuck with his findNearestByType, though. Do the different coins have different types, or am I stuck with "coin"?


#2

The “Meme” ? I’m going to assume you mean the Mimic.

And yes, all coins are type coin.


#3

There are “gold-coin”, “silver-coin” and “bronze-coin”. You can click to an item to see it types (if it’s selectable).

All pets have this ability/method.


#4

There are “gold-coin”, “silver-coin” and “bronze-coin”. You can click to an item to see it types (if it’s selectable).

I didn’t even know that!


#5

Sorry, looks like I was wrong. @Shmoogy just a "coin". You can use ".value" to distinguish them.


#6

Also I think we can add findByType especially for the Mimic because it’s a special pet.


#7

@maka Yeah, I meant the Mimic (I edited). @Bryukh it’s true, all the pets have findByType, but if I want to have my Mimic go pick up (magnetize, whatever) gold coins off on his own without my hero, I can’t rely on hero..value out of line of sight, and even then it’ll be difficult to factor in how far things are from the Mimic, as opposed to the hero, though I suppose this too could be accomplished with hero.distanceTo.

Thanks for the answers!

Edit: I didn’t realize that .value is called on the object, not through the hero. My Mimic is happily sucking up gold coins now.