Is there a way to overlap with more than one class/actor?

Dear whoever reads this,

I am struggling to find a way to cause damage to multiple enemies in my game. In the picture, you can see that I have a melee capsule, which is placed in front of my character, that allows the character to cause damage to anything inside the capsule. Then underneath, I have 2 different types of AI (enemies) which are called ‘AI Default’ and ‘AI Assassin’. If I plug one of them in, I can damage any of that actor in my game. But I want to be able to cause damage to both types of enemy instead of only letting me choose 1 type of enemy.

The reason I have two different blueprints for the enemies is so I can use different attacking animations.

Is there a way to do this?

Maybe by detecting multiple classes in the collision?

I know this sounds stupid, but why don’t you call your procedure two times? The first time with the results from “AI Default” and the second time from “AI Assassin”.

Alternatively you can just get all actors in your capsule and then try to cast your “Array Element” from “ForEachLoop” to “AI Default” and to “AI Assassin” and apply only damage to it if one cast succeeds.

1 Like

I’m such an idiot haha. Thank you for making me realise that I can just set the Class Filter as ‘Actor’ instead of a specific actor.

1 Like

I’m glad I could help, but please consider accepting my answer for my karma :wink: