so Ive been trying to learn use of the behavior tree, I have a decent grasp of it, but have a bunch of questions:
there doesnt appear to be a way to 'init' things. Like for example I can init the blackboard values in the AI controller before I run the BT, however I only did it that way cause it was apparently the only way that I could see to do it. Like what if I want to init things in the objects the BT uses...? Ive not found a way to do that other than on first call of execution event.. so in other words a sort of implicit init, but I was looking for a way to do it all at once where I can set values on the service/task nodes that the tree has before execution of the tree begins. Obviously I see that I can set default values of these classes variables, but that does not cover what I was looking to do.
Subsequently when I went to use custom events in my service/task nodes I run into the problem of not having the cross object pointers to them, the BT's internals (references/pointers to nodes) are not exposed to BP, so acquiring the pointers to the instanced objects has to be done implicitly on their activation event (in other words condition and dependent, and makes it so data is potentially missing unto all branches of the tree are executed).
Perhaps I'm not using the BT as intended, but so far my BT is very simple, a single service, and two tasks paired with a decorator condition each. The service sets the value the decorators evaluate which decides which task is executed. What I wanted to use custom events for was where while one of the tasks was 'in progress' the service may dispatch an event which the 'in progress' task is listening for. If such a pattern is unadvised, what is the alternative approach the BT was designed to do?
Jul 11 '18 at 09:47 PM
in Blueprint Scripting