How to overwrite collision response when collision event happens?

I am making a Tower Defence game with multiple factions. I want to have troops blocking troops of the same faction but ignore troops of other factions. I know this can be done by setting up custom collision object channels. But it is limited to 18 custom channels while I want to have more than 18 factions. So is it possible to do a check when collision event happens and overwrite the response to block/ignore base on the check result?

you can do a lot easier…just use a single collision channel and use add component tags.

Set different tag to different troops and filter by tag.

image

you can also use ACTOR tag instead if prefered.