SHARE
TWEET

AI Controller Header file

orfeasel Dec 31st, 2015 (edited) 15,542 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     /*Behavior tree comp ref*/
  2.     UBehaviorTreeComponent* BehaviorComp;
  3.    
  4.     /*----------Blackboard----------*/
  5.  
  6.     /*Blackboard comp ref*/
  7.     UBlackboardComponent* BlackboardComp;
  8.  
  9.     /*Blackboard keys*/
  10.     UPROPERTY(EditDefaultsOnly, Category = "AI")
  11.     FName LocationToGoKey;
  12.  
  13.     /*----------Blackboard----------*/
  14.  
  15.     /*I use the AActor class as the Template class so I can use the GetAllActorsOfClass function.
  16.     However, in this collection I'm going to store all the Available ABotTargetPoint instances.*/
  17.     TArray<AActor*> BotTargetPoints;
  18.  
  19.     /*Posses is executed when the character we want to control is spawned.
  20.     Inside this function, we initialize the blackboard and start the behavior tree*/
  21.     virtual void Possess(APawn* Pawn) override;
  22.  
  23. public:
  24.  
  25.     /*----------Constructor----------*/
  26.     AMyAIController();
  27.  
  28.     FORCEINLINE UBlackboardComponent* GetBlackboardComp() const { return BlackboardComp; }
  29.  
  30.     FORCEINLINE TArray<AActor*> GetAvailableTargetPoints() { return BotTargetPoints; }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top