Since there is no documentation on this. Can someone point out why this code is not updating my blackboard? It makes no sense.
void UBTService_AdmiralUpdateQueue::TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds)
{
Super::TickNode( OwnerComp, NodeMemory, DeltaSeconds);
UE_LOG(LogClass, Log, TEXT("Service Ticking."));
if (OwnerComp.GetAIOwner())
{
UE_LOG(LogClass, Log, TEXT("Has a Controller."));
//Get the AI Controller
AAdmiralAiController* Controller = Cast<AAdmiralAiController>(OwnerComp.GetAIOwner());
if (Controller)
{
UE_LOG(LogClass, Log, TEXT("Successful Cast."));
//If Queue is bigger that 0.
//Set blackboard keys to true.
//PlayerQueue
if (Controller->GetPlayerQueueSize() > 0)
{
/* The selected key should be "bPlayerQueue" in the BehaviorTree setup */
OwnerComp.GetBlackboardComponent()->SetValue<UBlackboardKeyType_Bool>(SubmarineBlackboardKey.GetSelectedKeyID(), true);
}
else
{
/* The selected key should be "bPlayerQueue" in the BehaviorTree setup */
OwnerComp.GetBlackboardComponent()->SetValue<UBlackboardKeyType_Bool>(SubmarineBlackboardKey.GetSelectedKeyID(), true);
}
}}}