What I would do for making them just stand there until Tharin runs up is to set their
5 meters, like is done in Munchkin Masher. Then you don’t have to worry about
attacksWhenOutOfRange stuff or making them immobile. (By the way, there’s a bug in Treema with the boolean toggles not saving, but you can toggle it and then close its parent to get around that for now.)
chooseAction is the main way that Thangs decide what to do. If you add the
Plans Component, then
chooseAction() is automatically rewritten to something that just executes the code the player puts in the
plan() method. A lot of the
ai Components have simple things they do to
chooseAction() and that’s all they do. So if you add a random
defrobnosticateWhatzits(), then it will never be called unless you call it from some other programmable method.
I kind of want to make a simpler
setTarget() that just takes a string ID that you already know, but it’s unclear how the Thang you’re programming would know that. You can see the code for
getEnemies() and such in the
Allied Component, but I’m not sure it’ll be very revealing. It gets deep into the internals.
What do you think the name/description for the playback scrub ratio should be?
HearsAndAggros with a single aggro response of
"Rar" on the Brawler, with a short
Hears hearing range. But you should be able to do Programmable on any Thang with the
isProgrammableDisabled so the player can’t edit it and have it work just the same as any player-controlled Thangs. Just might want to make sure that all the
ai Components are removed if you do that.
getNearestX() methods are limited by
visualRange, so if they returned nothing, that’d be why.
Hope this helps. Was good going through the level editor stuff on Hangout today!