Is there any way to have pawn sensing exclude specific classes of pawns?

I have an RTS camera character class that the player controls. I also have AI controlled character classes. I am working on the AI behavior, and I set it so that these AI controlled characters will follow each other when they sense each other via pawn sensing. However, they were only sometimes following each other and I realized that this was because most of the time they were focused in on the camera character that the player controls. Is there a way to set pawn sensing to ignore certain classes of characters?

I’ve tried unchecking only see players, but this doesn’t entirely ignore the RTS camera, i.e. when the camera is still in the pawn sensing range it will take precedence over other pawns. I have also tried comparing the pawn sensed with the object equal method, and preventing action if the pawn is the RTS camera but to no avail.

I’m sure there are several different ways to do this but, when I was testing around with trying to make factions and stuff I was just checking targets in range for if they had a tag or not.

You may also just be able to disable collision for your camera with ‘visible’ so it no longer triggers as something to be sensed. You may need to be careful about how your sound in your game is produced like that though.

Personally I’d just use the tags as you can also use them for other things but it’s probably not the most efficient way.

Hopefully someone else can provide a better solution.

Can you elaborate more on ‘tagging’? What property do I look for and would this be a property within the sensing pawn or sensed pawns?

edit: I did some searching. Are you referring to gameplay tags? Gameplay Tags | Unreal Engine Documentation

I think I found a method that works for now (although its viability may change depending on if my functionality changes in the future) but here it is (it’s actually quite simple and I feel pretty stupid for not thinking about it):

Basically I just grabbed the pawn return node that the pawn sensing event returns, and get the class. I then compare it to the class that I want it to sense (in this case it is its own class so i just set it to self) and then return the bool and have a branch from there. https://i.imgur.com/O41arEK.png

I think for now this works fine as I can also alter the bool expressions so that it can be exclusive too and not just inclusive.

Sorry, yeah gameplay tags. You can set them up in the settings then add them to your actors. Once your actors have them, when ‘beginoverlap’ happens you can check to see if they’re a valid ‘actor’ with ‘hastag’ and not have to worry about having the overlap event triggering on things you didn’t want them to in the first place.
I’ll post some spaghetti so you can get a rough idea. It’s pretty bad and Can probably be done easier but it was mostly just a test.

Heh just noticed there’s a duplicate hastag node in spag 3 but oh well.
Hopefully this will more or less answer your question satisfactorily.