Decorators are nodes that allow you to enter a conditional expression on evaluation of another node. They are fairly oddly named, but they are called Decorators because they tend to dress up execution nodes with conditions for execution. For example, in the following diagram, the MoveTo
function is only executed when the Decorators condition is met:
There are several pre-packaged Decorators that come with UE4, including Blackboard (variable checks), Compare Blackboard Entries, Cone Check, Cooldown, Does Path Exist, and so on. In this recipe, we explore the use of some of these conditionals to control the execution of different branches of a Behavior Tree.