How to make a generic Env Query Generator? (EQS)

I have a recurring problem in my game.
On many occasions I need to know if an object has a parent or not.
I have a concrete solution to this problem.

But I don’t know how to make it work with different classes of objects. I mean, I want it to be generic.

But I can’t use generic variables because everything gives errors.

Does anyone know how to do it?
Thank you very much!!

Hi,
Did you try creating a generic parent that all other object inherit from that need to be tested? That way you can test against that parent.

1 Like

Hi, yes i did it… more or less… i did one for the weapons and i did other for the items (the others objects can be attached)…

But if i create the same generic parent for all of them… then i will have other problem… i’m goin to get weapons and items together when use “Get All Actors Of Class” method…

I think that the ideal is to be able to pass the type as a parameter to Get All Actors Of Class"… I think that this should be possible, otherwise it would not has that input pin…

Anyway thanks for the idea. I’ll keep it in mind if I don’t find a better solution.

1 Like

I think I’ve got it… at least it seems to work. The problem was the “ForEach Loop”…it seems to has memory. It remembers the previous object type. This was causing the errors. So I deleted it and put a new one. So I modified the algorithm a bit and I think it will work with any type of class.

Thank you very much for your help!!
Very appreciated!!