Decorator Always Returning False


Author - Cameron Euston

The Problem:

I was working on the baby robot ncp this week which required me to create my own custom decorator. This was my first time using custom decorators with behavior trees so I had to learn new concepts. There was an issue I was having with the custom decorator where no matter what the decorator would never return true and go to the correct path in the behavior tree. 

The Solution:

I first went to see if the decorator would go through the path if I were to just return true in the decorator. I did that and was able to confirm that the path returned true. I then knew that the issue had to be with either the logic or a simple mistake along the way. I then went and put breakpoints in the decorator to see if the expected code path was taken. This is where I discovered that the trigger volumes that were required for the condition check were set to 'None'. This is where I went back to where I was setting the trigger volumes for the behavior tree blackboard and the logic seemed fine. I then discovered that I had made a simple typo on the blackboard key name where I was setting the blackboard key and corrected it. After that the ai behavior acted as expected.

Leave a comment

Log in with itch.io to leave a comment.