Hi,
I’ve been working on an archer type enemy who gets to the top of the structures with the best angle to hit the Player, for that I created an EQS query which;
first, check the Z distance to the player and then prefer the greater score.
second, shoot a filter-only line trace towards the player with the bool match unchecked to find the best spot that he can see the player.
third, check the distance to the closest location.
the Issue is when I put multiple enemies in the game they all go to the same spot and then bunch up together, What can I do to make It choose the random spot among the ideal ones so that they each go to different spots?
Is there a way to get access to that “Get Query Results as Locations” in the behavior tree?
so that I can store the locations and then get a random one, therefore, feed it to my " move to " task.
I assume in this way I don’t need to put a “Run EQS Query” node in my BT because I’ve already used a " Run EQS Query" function in the previous task, is that correct?
Hi, apologize for bothering
I’ve encountered another issue
In order to prevent AIs to get bunched together, I acquired all valid query results as locations with EQS run mode on “Single random Item from best 25%” as you suggested, but the issue is as the AIs reach the points they move to another one, I want them to stay where they are once they reach the points and don’t move until the player location changes and EQS gets updated to find better spots according to the player location.
That depends a lot on how you have the behavior tree, you could have a service that checks if the player has moved from the last position and then make the eqs and move to branch activate