This information is intended for people who use Hazelight's UE4 Angelscript branch and want to work with UE4's AI Behaviour Trees using Angelscript.
- Decorators are used to gate or switch BT node logic - inherit from
UBTDecorator_BlueprintBase
class to make a new one - Services can update or change variables and tick at custom rates during task execution - inherit from
UBTService_BlueprintBase
class - Tasks do work until they succeed or fail as indicated by calling
FinishExecute
, which determines the outcome of branches in the tree - inherit fromUBTTask_BlueprintBase
class
- Use Blackboard Keys for anything you want to be "modular" - if you have direct data entry into a node's properties then you will not be able to make that node behave differently when using the same Behaviour Tree on multiple AIs that might need different properties - Having Acceptance Radius as a
float
variable is an example of this where Epic have made it hard for people to reuse BTs across different-size enemies! - Always add types to the
AllowedKeys
array of any Blackboard Key property you add to your nodes - this will make it easier for users to select the correct type of key - Allow multiple key types if it makes sense - e.g. if your node wants a Direction, you can allow Vector, Object and Rotator key types since these can all be used to get a valid direction vector