I have a couple of questions regarding the behaviour tree, as to be honest I’m having some real difficulties with it…
I’m trying to work out why the MoveTo doesn’t trigger.
I have 2 services and a task (please see attached picture). BS_SelfCheck simply checks if the ControllerAI’s controlled pawn has anything on it’s action stack (declared as a local array in the character blueprint), if it does, it sets the blackboard key “InputAction”. BS_ActionCheck checks the first element in the characters action stack (at the moment only ever move requests). If it’s a move request, it sets the “ActMove” blackboard key and sets “LocTrgt” (Vector ) to the location to move to. I’ve checked the logic in both services, and in both cases the InputAction, ActMove, and LocTrgt blackboard keys are set and to the correct values immediately before exiting the event tick code nodes (got them back out of the blackboard after setting them to check their values).
First point, The “Event Receive Activation” event is called in BS_SelfCheck, but never in BS_ActionCheck (I set a breakpoint set after the BS_ActionCheck EventTick node which catches, but a breakpoint straight after it’s Receive Activation Event is never triggered).
The second point, I don’t know whether the MoveTo task is being called (I think the breakpoints placed on composites in the BT don’t ever trigger (neither of the breakpoints in the picture trigger even when they’ve been passed through). Note: I’ve just removed the connection to the MoveTo composite and replaced it by connecting to the BTActionAction composite, and this gets called fine (breakpoint inside), so I’m assuming I’m not calling the MoveTo task correctly…
Third point, I would have preferred to use a decorator for the BS_ActionCheck, but this is a temporary workaround as I tried to write a user defined decorator that did the same thing, but I couldn’t find either the “Finish Condition Check” (deprecated) or the suggested “Perform Condition Check” nodes in the event graph context menu. Any idea why these aren’t appearing? What node should I use to return the condition result from a user defined decorator?
Last one, would the BS_ActionCheck service stop running (get killed) when the selector/sequence composite it is in exits (i.e. has finished evaluating and running child nodes and falls back up the tree)?
Any help would be great…
Thnx