Specifically, I’m looking for information about what members are present on what objects. I didn’t know until late in the forest that the result returned by self.findNearestEnemy has a “pos” property. I tried:
self.say(dir(enemy))
But the interpreter choked on it. I was hoping for some sort of “id” field, so I can determine when self.findNearestEnemy is returning a new enemy, or other ways to determine when I’ve killed my previous target.
Standard enemies also have a target property and the distanceTo, hasEffect, and findNearest methods.
At some point we’ll be able to show you those API properties by either clicking on the unit you want to know about, or hovering over it using the hover debugger, but I haven’t gotten any good UI ideas for the first one, and I haven’t fixed the remaining bugs to re-enable the second one yet.
Hi, I think this topic is still actual. Don’t you plan to realize the things you suggested?
Or, wouldn’t it suffice just to give a short paragraph listing at least all the basic properties of enemies and items somewhere? I think this would help the learners to focus more on the coding itself, spending less time Googling for aspects of the game itself.
Hi there, thanks for this tip! Yet, it took me some time to really get to the properties. So here is an example screenshot of how you can get to them on a selected object: