Behavior Tree Tutorial

, I’m glad that helped. Now your tutorial can be even better. :slight_smile:

One more note on the ShooterGame Behavior Tree. One of my coworkers pointed out that it still has a “Return true hack” node in it. While that does work, the current “best practice” implementation is to use a decorator called “Force Success” on the “Pick up ammo” node without an extra selector.

However, the “Force Success” decorator is quite new; in fact, it’s so new that I believe you’ll only have it if you compile the editor yourself from our latest code. The released build still has a (now deprecated) node called “Optional” which serves roughly the same purpose. (There are some functional differences between Optional and Force Success when used as a child of a Selector, but not under a Sequence as in this case. We decided Optional was rather odd and unintuitive, which is why we deprecated it in favor of using Force Success.)

If anyone needs similar functionality and isn’t compiling code themselves (or just doesn’t want to sync to latest in between builds), I’d recommend using Optional for now until our next build release. Then the node will turn red and remind you to replace it with Force Success (at your leisure).

As you can see, rapid development is still ongoing, especially since behavior trees are still “experimental”! :slight_smile:

Here’s a screenshot where I used the released build to add an “Optional” node… if you have built latest code yourself, use “Force Success” instead! :slight_smile: