# EQS How to create custom test to filter actors?

**URL:** <https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703>\
**Category:** AI\
**Tags:** EQS, unreal-engine, filter, test, question\
**Created:** [December 5, 2014, 7:58pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703 "2014-12-05T19:58:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ghar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ghar](https://forums.unrealengine.com/u/Ghar)\
**Post date:** [December 5, 2014, 7:58pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/1 "2014-12-05T19:58:37Z")

</div>

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**

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [December 5, 2014, 8:45pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/2 "2014-12-05T20:45:57Z")

</div>

Blueprint of C++?

---

<div class="post-metadata">

**Author:** ![Ghar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ghar](https://forums.unrealengine.com/u/Ghar)\
**Post date:** [December 5, 2014, 8:47pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/3 "2014-12-05T20:47:03Z")

</div>

Blueprint

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [December 5, 2014, 8:50pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/4 "2014-12-05T20:50:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ghar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ghar](https://forums.unrealengine.com/u/Ghar)\
**Post date:** [December 5, 2014, 8:59pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/5 "2014-12-05T20:59:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Justin.Dooley](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justin.dooley/32/1194553_2.png) [@Justin.Dooley](https://forums.unrealengine.com/u/Justin.Dooley)\
**Post date:** [December 5, 2014, 11:11pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/6 "2014-12-05T23:11:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [December 7, 2014, 3:22am UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/7 "2014-12-07T03:22:03Z")

</div>

I’m not sure I understand what you’re asking 🙂

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [December 7, 2014, 3:31am UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/8 "2014-12-07T03:31:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Justin.Dooley](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justin.dooley/32/1194553_2.png) [@Justin.Dooley](https://forums.unrealengine.com/u/Justin.Dooley)\
**Post date:** [December 8, 2014, 6:20pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/9 "2014-12-08T18:20:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [December 8, 2014, 8:26pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/10 "2014-12-08T20:26:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Stormrage256](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/stormrage256/32/1008648_2.png) [@Stormrage256](https://forums.unrealengine.com/u/Stormrage256)\
**Post date:** [January 27, 2015, 4:41am UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/11 "2015-01-27T04:41:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [January 27, 2015, 8:15am UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/12 "2015-01-27T08:15:56Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Ixiguis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ixiguis](https://forums.unrealengine.com/u/Ixiguis)\
**Post date:** [July 10, 2015, 4:14am UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/13 "2015-07-10T04:14:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a3219dab1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a3219dab1](https://forums.unrealengine.com/u/anonymous_user_a3219dab1)\
**Post date:** [March 25, 2016, 10:04am UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/14 "2016-03-25T10:04:11Z")

</div>

Still not possible in 4.10?

---

<div class="post-metadata">

**Author:** ![anon72785453](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon72785453](https://forums.unrealengine.com/u/anon72785453)\
**Post date:** [July 19, 2016, 3:03pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/15 "2016-07-19T15:03:34Z")

</div>

Curious about this as well.

---

<div class="post-metadata">

**Author:** ![intoxicat3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@intoxicat3](https://forums.unrealengine.com/u/intoxicat3)\
**Post date:** [September 16, 2016, 9:23am UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/16 "2016-09-16T09:23:37Z")

</div>

Still not possible in 4.13.

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [September 16, 2016, 2:04pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/17 "2016-09-16T14:04:34Z")

</div>

That’s correct.

---

<div class="post-metadata">

**Author:** ![wilberolive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wilberolive](https://forums.unrealengine.com/u/wilberolive)\
**Post date:** [August 3, 2017, 10:25am UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/18 "2017-08-03T10:25:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RotemS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RotemS](https://forums.unrealengine.com/u/RotemS)\
**Post date:** [May 10, 2018, 11:10am UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/19 "2018-05-10T11:10:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mikiok](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mikiok](https://forums.unrealengine.com/u/Mikiok)\
**Post date:** [May 10, 2018, 2:56pm UTC](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703/20 "2018-05-10T14:56:56Z")

</div>

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

[Next page](https://forums.unrealengine.com/t/eqs-how-to-create-custom-test-to-filter-actors/300703.md?page=2)
