How to implement BTService in C++

Tengrichan
Mon, 16 Jan 2017 15:45:17 +0000
AI

Hi there!
I am trying to convert my Behavior Tree tasks,services,etc. from BP into C++ for faster runtime and more customisation.

However I can’t seem to figure out how to implement a Service in C++.
As the events defined in BP like Event Receive Activation AI and Event Receive Tick(I use these currently,use Receive Activation to initialize some values) are not available in BTService.h but only in the blueprint version BTService_BlueprintBase.h
My class derives from BTService.
So i am not sure what functions correspond to those two functions in case of C++.
It’s especially confusing since the Service has already a Tick function just after creating the class.

Looked into the source code trying to figure out and found TickNode() and OnBecomeRelevant().However can’t really decide if these are what i need to replicate the blueprint execution.
Also if Tick function is already implemented how can i access it so i can implement what i want based on my BP?
Do i even need TickNode() if the Service has already a Tick() function when i look at it in the BT?

Sorry if this is obvious but my c++ skills or rather my source code reading ability is apparently lacking.

Thanks.

4 posts - 1 participant