I just bought the Hardened Steel Glasses and have been playing with FindByType(). Based on that experience, I was wondering about a few things:
Is there a comprehensive listing of the different types of enemies? Or all different types in general?
Are all spaces in type names handled with a “-” (as in “sand-yak”)?
Do coins have types? I’ve tried “gold-coin” and “gold” but neither work. If not, is there a reason why coins don’t have types even though each has a different name?
I’m agree with you, very often, an easy way to get types is missing.
What you can do is to select an unit, the type will be displayed ( without the -).
You can also : this.say(enemy.type), which is more accurate.
About coins, I remember you could use something like that : coin.value
It gives the value, and it’s the most important thing
(not sure, correct me if I’m wrong).
I came back to a previous where I used coin value : Greed.
In this level, coin items have the following properties :
bountyGold = 1,2 or 3 for example (sorry, I don’t remember it was such name)
type = "coin"
id = “Silver Coin 9”
So you can do :
if(item.bountyGold > 2)...
or
var rank = item.bountyGold / this.distanceTo(item);