Hi there,
I have a bunch of EQS queries and while results are produced in the finished function, it doesnt show up in the main function because it is waiting to finish.
This is the function calling the eqs query
EnemySeekerQueryRequest = FEnvQueryRequest(StructQuery.EQSQuery, EnemySquad->SquadLeader);
EnemySeekerQueryRequest.Execute(EEnvQueryRunMode::SingleResult, this, &URA_SquadController::EnemySeekerQueryFinished);
if (tempsquad->OptimalLocation != FVector::ZeroVector)
{
break;
}
And this is the one processing the results
FVector resultlocation= Result->GetItemAsLocation(0);
tempsquad->OptimalLocation = resultlocation;
Issue is that OptimalLocation is always zero because the results dont get to it after execution of the Query. How do I wait for the query to finish before checking the result? As I understand EQS queries are executed asynchronously.