How to single out enemy PCs and inanimate enemies


#1

On the zero sum level, cavern survival (PC vs PC) level, and many others, it would be very useful to be able to treat the enemy PC, say, different from a box with a yeti inside. One of these is clearly not like the other.

It would also be very useful to be able to tell the difference between inanimate objects (door, wall/palisade, box) and damage-dealing enemies.
Currently these things are possible by running a process of elimination (not sand-yak, not munchkin, not scout, not thrower, not shaman, not ogre, not fangrider, [or not archer, not soldier, not artillery, not yeti, etc]) but this is clearly very inelegant.

Is there a simple way that I’m unaware of? Something just not taught by the standard levels?


#2

If you want to find out the type of a Thang, you can always find the thang in question, and say: “this.say(enemy.type)” And your character will shout what what the Thang is.

Now, in Zero Sum… This is a little easier because you can always shout out your OWN type, to see what the type of the enemy is. But, that won’t always work… So, you’ll need to go through the list of enemies until you spot the type of the enemy that isn’t like the others.


#3

The .id of the heroes are “Hero Placeholder” and “Hero Placeholder 1”, humans and ogres, respectively.


#4

While this is true for any level created by the staff, it is not necessarily (but likely) true for any given level.
The Artisan creating the level can rename the Placeholder to something else. In fact I did this for my testlevel, as I didn’t want to write this.world.getThangByID("Hero Placeholder"); all over the place (I know I could have cached it. My bad.)

Despite from that, most Artisans will leave it as it is. The only way to be perfectly sure is to iterate over the types and find out which one is not like the others.


#5

Actually, if you don’t name it Hero Placeholder, it won’t have its equipment assigned from the player’s inventory. So that’s kind of a magic string. The Referee already has it saved as @hero for use in its extraCode, by the way.