DetectPlayer - golden-coconut-studio/TikiAdventuresWiki GitHub Wiki

  • This task allows the AI to detect the player and its location. It then stores this location in the blackboard, which other tasks can use.

  • Properties:

     - VisionDistance : 1500.0f (Modifiable in blueprint. the AI will only be able to detect players within this radius.) 
    
  • Functionality:

     - Check if the AIController exists.
     - Get a refference to itself, the blackboard, and all players in the map.
     - then, for every player in the map, we take the players and put them in a list, only if they are within the VisionDistance
     - then from the list, we choose the one that is the closest to the AI and send that as our target to the blackboard.