# Create a custom behavior tree decorator in c++

**URL:** <https://forums.unrealengine.com/t/create-a-custom-behavior-tree-decorator-in-c/301319>\
**Category:** AI\
**Tags:** Behavior-Tree, decorator, unreal-engine, feedback, UE4, CPP, question\
**Created:** [December 11, 2014, 6:16pm UTC](https://forums.unrealengine.com/t/create-a-custom-behavior-tree-decorator-in-c/301319 "2014-12-11T18:16:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![conneich](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@conneich](https://forums.unrealengine.com/u/conneich)\
**Post date:** [December 11, 2014, 6:16pm UTC](https://forums.unrealengine.com/t/create-a-custom-behavior-tree-decorator-in-c/301319/1 "2014-12-11T18:16:31Z")

</div>

Im a hobbyist with ue4 and since I’ve been having problems with custom behavior tree nodes and decorator created within the editor’s blueprint editor,i was wondering: can i use the ue4 engine’s master branch from github and create my own nodes/decorators that would work like the native ones already available? And if so, where should i begin looking in the source files?

(I’m actually at work right now using my phone to type this) Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [December 11, 2014, 7:45pm UTC](https://forums.unrealengine.com/t/create-a-custom-behavior-tree-decorator-in-c/301319/2 "2014-12-11T19:45:56Z")

</div>

Master branch contains a fix to BP-implemented BT decorators and should just work as expected. If you want to look at code details `UBTDecorator_BlueprintBase` is the place to start.

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![conneich](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@conneich](https://forums.unrealengine.com/u/conneich)\
**Post date:** [December 11, 2014, 11:19pm UTC](https://forums.unrealengine.com/t/create-a-custom-behavior-tree-decorator-in-c/301319/3 "2014-12-11T23:19:32Z")

</div>

Thank you for the reply! Im currently building the master branch to hopefully take advantage of the updates. One reason I asked about the decorators was because I noticed that there is one missing that should be implemented. A “In Range Of” decorator that allow execution of a node if the passed in actor/vector is within range, or not within range, of the behavior tree’s calling actor.
