EQS How to create custom test to filter actors?

Hello

I have an Environment Query that searches for a specific type of Actor using the ActorsOfClass Generator.

I would like to filter out the actors that have one of their variables set to a certain value.

How would I create a test to do that?

Thanks.

Edit: I’m using blueprints

Blueprint

Sure, that would be great! Thank you very much.

Blueprint of C++?

Unfortunately it’s not currently possible to implement custom EQS tests in blueprint, sorry! If you’re willing to use promoted UE4 from github I would be able to bring it in in couple of days. Let me know.

Cheers,

–mieszko

Without getting the git source, what goes into making a custom test? I need to do something similar specifically filtering AI teams.

I’m not sure I understand what you’re asking :slight_smile:

It turns out it’s not that straightforward. I need to think about this a bit more.

No to worry, I got a copy of the Git repository to see the .cpp code for the tests. It seems that tests are fairly simple and are basically just implemented in the RunTest function.

Generally speaking, yes. One thing to remember though is that you should use FEnvQueryInstance::ItemIterator to iterate over items and set scores or test results.

Hi MieszkoZ, are there any near future plans to bring custom tests for EQS into blueprints?

I’m terribly sorry but this feature is currently on hold due to many things of higher priority happening now. It’s not forgotten though and will get done past-GDC-ish :slight_smile:

If I have a list of characters (ActorsOfClass), and I want to score them by their health, I would need a custom test, right?

Still not possible in 4.10?

Curious about this as well.

Still not possible in 4.13.

That’s correct.

So, almost 3 years on… this still on the todo list or coming soon?

And in 4.19… why has Epic abandoned such a useful system which is so close to being usable?

If I understand correctly what you need, I think You probably could use gameplay tags to achive this effect