Set Timer by Event Not Firing in Behavior Tree Subtree

Hi, I’m having an issue with a Behavior Tree in Unreal Engine.

I created a custom decorator that waits for a Blackboard variable (bool) to become true or false and starts a cooldown timer using a “Set Timer by Event” node.

When I use this decorator in the main Behavior Tree, everything works perfectly.

However, when I use the exact same logic in a subtree, the “Set Timer by Event” node doesn’t seem to fire at all.
The code is identical in both cases, but for some reason, it behaves differently when placed in a subtree.

I’ve checked the Blackboard variables and other references, and everything seems correct.

Does anyone know what might be causing this or what I’m missing? Any help would be greatly appreciated!


I found a possible solution. (or workaround) The problem is that the custom decorator doesn’t fire because of the way decorators work within subtrees. This can have context and lifecycle issues.

To fix it, I moved the cooldown logic into a Behavior Tree Service instead of using a decorator. I placed this service on a selector node just after the root of the Behavior Tree. This ensures the service is always active and manages the cooldown consistently.

Inside the selector where the decorator used to be, I replaced it with a Blackboard Based Condition that checks the Blackboard boolean variable. This way, the tree still makes decisions based on the variable, but without the decorator interfering with the timer logic.

By using a service to handle the cooldown and adjusting the tree structure, the “Set Timer by Event” node now works correctly, and the issue is resolved.

Hope this helps anyone facing a similar problem!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.