orfeasel

AI Controller Header file

Dec 31st, 2015
17,112
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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×