How would I go about forcing an entire reset of a Behavior Tree by script?

JO$EPH QUE$TED

New member
When an enemy is hurt, I want them to stop all currently running actions and restart the tree from the very beginning. I would also like to be able to have them launch into a different behavior when that happens if possible. IE: enemy was about to attack, but it got hit so instead it runs away and restarts the behavior tree.

thank you. (y)
 
great, thanks Justin. Is there an API reference anywhere that I can read?

the "new and improved" documentation reads like a tutorial. the tutorial-like documentation is certainly useful, but i want something that actually just unpacks the BehaviorDesigner class and all of its contained functionality / methods. i am guessing that the legacy documentation was probably more along the lines of what i am after, but now the whole product is a lot more user-friendly which kind of makes it less programmer friendly in my opinion.


thanks again.
 
We don't have an API reference online but you should be able to use the Object Browser within your IDE to generate one. This will ensure that it is always up to date :)
 
that's cool, i will look into generating my own. i think behavior designer is great, so keep that in mind when you hear the following criticism;
i do not think the documentation is good. i find it very difficult to navigate, and i don't find the argument of "we don't have an api reference, make your own!" to be compelling, as it is very much not the industry standard.

your competitors, like playmaker, have pages like this playmaker api reference, and this action reference.
clearly stating what tools exist within their framework, and how to use them.

behavior designers documentation reads more like a start to finish walkthrough with a huge glowing "NEXT" button at the bottom of every page.
this is great when you are first learning how to use the tools, but makes finding information during development very difficult.

let's say i want to consult the documentation to even just get a description of what a sequencer does, or what a conditional selector does. i have no idea where to find that information, there is no page with a list of actions, and none of your documentation is searchable. that information exists within tooltips in the unity editor, but that isn't what tooltips are designed for. they're meant to be tips and reminders, not tutorials.

i want to see y'all do well because i think your products are of high quality, i've probably given you $200 at least over the year buying them, but i don't think you're going to reach your full potential or retain the quality of customers you want if you don't improve your documentation.

<3
 
  • Like
Reactions: Ony
We don't have an API reference online but you should be able to use the Object Browser within your IDE to generate one. This will ensure that it is always up to date :)

I had to dig through my email to find my years old invoice in order to create an account just to say this. I'm extremely sad that this is the answer we got. I could go through paragraphs to try to justify why I don't work with a IDE but I don't want to put that much more time into this. I use Sublime, and I'm not a power user. I dread so much finding that the assets I bought don't come with a complete documentation because their developers want us to work in the way they work.

1593465279922.png

After following the first link you provided I want to now know what "pause" does. Normally you would expect a page explaining things. But here I have to download an IDE and *learn* how to generate a documentation apparently? Those are the sort of things that really start making work stressful. Sure, if I had a good PC with decent storage and ram I could just download things willy-nilly. Sure, if I had a fast Internet connection. Sure, if my old HDDs weren't already struggling running Backblaze in the background (because I can't afford to lose all my work again) together with my huge Unity project. Under ideal conditions, the workflow you want us to follow where we have to "generate" our own documentation would be no big deal. But for people that don't have those ideal conditions not giving us a proper manual to use a tool is just... depressing sometimes.

I guess I'll just have to try and guess for 30 minutes or so what the unexplained things do.
 
Last edited:
The docs are always a work in progress so the more feedback on a particular topic that I get the better. I'll add this to the docs but pause will temporarily stop the behavior tree at its current execution point and then can be resumed with EnableBehavior.
 
Top