Simple Parallel node with Dynamic Task Behavior as the Main Task question

This Behavior tree is an experiment and just in a intermediate experimental state. The main intent in this tree is to allow the main work task on the left side of the Simple Parallel node to run while the sensing and thinking branches run on a different thread on the right of the Simple Parallel node.

However, even though the Dynamic Task is an option for the main task, I can’t get it to work with the Simple Parallel node. It does work with the other nodes but if the two sides can’t run in parallel, the AI is blind while it is doing as task. (in this experiment)

Can anyone explain what I am doing wrong or is the dynamic task behavior incompatible with the Simple Parallel node?

I have no answer to your direct question but in a normal behavior tree environment I would collect the data not in the right graph. Instead I would use a service to collect the information. They are exactly used for this purpose. Imho your right graph is only a workaround for a service.

If you use a service you don’t need SimpleParallel at all for this case.

Thank you. I need to learn about services still. From the unreal learning course “Introduction to AI with Blueprints”, if I recall correctly, the tick interval for the service can be set so that means that it also runs in its own thread or time. You helped me very much!

The first thing that strikes me about services is that they are only blueprints. I think that what HAF-Blade said is true about using the service blueprint or blueprints for sensing and thinking. Basically, it could probably be done with services.

That said, the behavior tree it is an excellent flow control scheme. I imagine that the logic of the thinking branches could be greatly expanded and more easily readable from a conceptual level because of the way the nodes are laid out in a logic flow fashion.

I imagine it might be possible to write c++ code (not sure though) and start it from a custom task that gets the Dynamic Subtree object and starts it in a separate thread. Then I would be free to expand the sense and think side of the tree as much as I want. However, I don’t know. Perhaps an AI Controller simply can’t execute two trees at once by design.

If the Run Dynamic Behavior node won’t work with the Simple Parallel node, I can’t think of another way to do it yet.

Why do you think that services are blueprint only?
Every blueprint class inherits from a c++ class.
In this case the class is UBTService.

It is even mentioned in the standard documentation.

I understand. I meant that a service isn’t laid out like Behavior Tree. I am just getting started. Blueprints are great. I think a service blueprint is probably just fine for this purpose. I am just getting into blueprint functions and interfaces and blueprint organization methods, so I have a long way to go, but I am pretty sure the service logic can be structured and organized in a way that doesn’t make it more incompressible as it is extended.

However, the behavior tree system makes organization natural. I would rather find a way to get the Dynamic Behavior Task to work with the Simple Parallel node.

I am hoping that someone can confirm whether or not I am making a newbie mistake in not being able to make Dynamic Behavior Tasks to work in the Tree I posted, before I consider this resolved.

Sorry but the nooby mistake would be not to use a service class and not to learn blueprints in ue4.

Blueprints are the first thing you should learn because it us used everywhere.

Thanks HAF-Blade. There is a couple of options. The service is one or simply swapping the side that the Dynamic Behavior Task is running on. It doesn’t allow me to lay out the logic of the sense and think on the left side in the behavior tree but I can put in a custom task on that side that links to that logic, wherever it may be. It works fine that way too and I think the blueprint layout system is very nicely done too and it has major advantages.

I’ll mark this resolved with both of these solutions.