Confusion with large behavior

Kopekku

New member
Hello, I've got two questions:

I have a big main behavior with basically a selector that branches into different sub behaviors, (I'm attaching a picture of a very simplified diagram of it.) It looks huge so I'd like to clean it. What is the best way: Using the big main behavior with external behaviors for each branch of the selector- or getting rid of the big behavior entirely and just have mini behaviors that I enable or disable through code, like in the CTF sample. I read through the docs but I'm still confused on how to use external behaviors, and if they are meant for this, plus they don't really clean the mess because during runtime they show themselves anyway in the big behavior. The second question is, if what you recommend is the other option, (having many sub behavior components attached to the NPC), then would you recommend having anyway the big behavior and enabling/disabling those mini behaviors inside of it or doing it all through code like in the CTF sample?

I'm sorry if this is an ambiguous question, I'm just confused for a long time about this and hesitant to not use it "the way you are supposed to", so really anything you could tell me would help me a lot.

Thank you very much!
Rafael.
 

Attachments

  • Screen Shot 2021-04-11 at 00.05.12.png
    Screen Shot 2021-04-11 at 00.05.12.png
    90.4 KB · Views: 10
There really isn't a 'right' way to this and it's more what makes sense in your mind. For the Ultimate Character Controller integration tree I have a large tree with many external trees and overall this seems to be working well. You can see how this tree is structured on this page:

 
Top