Services are nodes that contain Blueprint code to be executed periodically. Services are a lot like Tasks, but they do not have a FinishExecute()
call at the end.
Adding Services to your Behavior Tree is essential for periodic checks of things such as if there are any new enemy units within range, or if your current target left focus. You can create your own Services. In this recipe, we'll assemble a Service that will check if the opponent you are following is still the closest within a visibility cone. If not, then the opponent changes.
There are four main events for a Service node (other than Tick):
Receive Activation AI: Triggers when the Behavior Tree starts and the node is first activated.
Receive Search Start AI: Triggers when the Behavior Tree enters the underlying branch.
Receive Tick AI: Triggers each frame where the Service is invoked. The bulk of the work is performed here.
Receive Deactivation AI: Triggers when the Behavior Tree closes and...