How do I finish executing a Blueprint Task?

Hi, I am having problems linking the behavior tree to the blueprint. It executes what is in the behavior tree, but it doesnt even start executing what is inside the blueprint class. The blueprint class is a BTTask_BlueprintBase. Is something missing in my blueprint?

It is still not executing “MoveTo”. If I play the game with the blueprint open, shows that nothing is running inside it. Maybe the problem is at starting the execution?

Hello,

You need to make sure that at the end of the execution path that you include a “Finish Execution” node. Make sure to check the “Success” box so that the Behavior Tree knows to move to the next part of the sequence properly. Let me know if that helps!

Cheers!

Also, make that radius 1000 instead of 100. Trust me, I have gone through that tutorial and if you do not then the character will not move much.

Could you try putting a “Print String” at the beginning to see if it is hitting the execution to begin with? You may also want to try setting up another before the end execution as well. This will help to find how far the logic is getting before it fails.

Using the “Print String” I just figured that the blueprint is running from start to end, but it is still not getting the random point that it should be getting. In the bottom right of the behavior tree the value of GetPoint never changes.

The first thing to check would be that the character is spawning within the NavMeshBounds volume on a ground that it can navigate on. Press “P” while in the viewport to visualize the navmesh. Also, it may have failed to cast, so try having the “Cast Failed” execution trigger a different print string as well. Let me know what the results are and I will be happy to further assist.

Thank you!

Thank you so much! I got it working!
Now I need to the AI chase the player. Any idea from where to start?

A good idea would be to do a form of trace to get the players location, then have it update every so often, replacing the previous Walk To location. You will need to make sure to abort the Walk To or else the AI will not change targets until it reaches the previous Walk To location. The trace can also make sure that the AI has to see the player to start going towards them.

You will also probably want something to check to see if the player has been reached.

Here’s an example of what the BT may look like:

This is an outline more than anything. If you have any further questions about the Behavior Tree, please feel free to start up a new post.