What does the blackboard decorator do exactly? (+help with my decorator if possible)

I understand that it’s a case of “if this is that, do this” but for some reason mine is firing off either way. I have it linked to a float key that I set when a task is fired off. For some reason, it aborts the sequence anyway.

As far as I can tell, I’ve done everything I should but it fires the sequence off once and then immediately moves onto the next task. Is it even a decorator issue or something else entirely?

Not sure why exactly it’s failing, but it might be easier if you monitor the detection float in a service (or the ai controller itself) and set a bool (bDetected maybe?) when it hits 100. Then just have a decorator check if bDetected IsSet. Or, Wherever you’re setting DetectionValue, just follow it up with a branch off a value >= 100, and set bDetected to true or false from branch.

I have no idea why it’s not working either, but this method with the booleans also doesn’t work and just has the same issue.

This screenshot is where I set the boolean if the detection value is greater than or equal to 100.

You can see that being executed correctly through the print strings that I have used.

This is where I set the boolean key in the Blackboard but ONLY if the Boolean from the AI blueprint is true.

This is the decorator setup.

You can also see here in this screenshot that it still just aborts immediately. It even EXPLICITLY states in the decorator that the value of the key is false which should mean that its a pass. It just plays the event once and then disregards the rest of it. (I tried adding a screenshot of it not working in-game but I’m limited to 5 screenshots per post)

…Any other ideas?

No worries, guys - I found a solution!!


If I reorder my selector so that it attempts to run the “MoveAway” task first and then “AddDetection” task second, I can then put another Blackboard Decorator on the MoveAway sequence that checks if a corresponding Boolean key is set. That means that it will ONLY play that sequence IF the Boolean key is set - if not, it will run the AddDetection sequence that uses another Blackboard Decorator with the same Boolean Key that checks if it is NOT set. This means that this sequence will only play if that Key isn’t set, and will not play if it is. If the Key becomes set, it will abort itself. That means that it will run the Behaviour Tree again (from left to right) so that when it next checks if it can run the MoveAway sequence, it will be able to. I hope that makes sense for anyone with a similar issue!