Full API reference for Python


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:


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.


enemy.health <= 0

is what I use (Well, actually the opposite, alive is: enemy.health > 0)


Here are the one’s that I know of.



[searching] Complete List of options

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.



you can see in detail all propieties in :

select a enemy
and pick the properties tab


Or all list in:

documentation tab



Thanks for posting this. I’ve been trying to find a reference list for all the properties that can be accessed so I can make smarter AI code for my hero in the brawl mission. Still trying to puzzle out how to generate random numbers via LUA too in this interface since any attempt that uses default LUA syntax that I’ve tried so far has only errored out. I’ll figure it out eventually.