Understanding services
Since you are already acquainted with services from previous chapters, I will now provide you with additional information to further enrich your understanding of this topic. Let’s explore these details to enhance your expertise in services within behavior trees.
Creating C++ services
A service extends from the BTService
class, and its main implementable function is OnSearchStart()
, which is executed when the behavior tree search enters the underlying branch. You can use this to create some kind of initialization if needed.
Furthermore, it is important to remember that services extend the BTAuxiliaryNode
class, thereby inheriting all of its functions. One particularly crucial function inherited by services is the TickNode()
function, which plays a vital role in the implementation of services, as it governs the execution and periodic updating of the service node within the behavior tree.
Creating Blueprint services
When creating a service...