darkrealos
You know what forget about my capx will not work either sorry for that, I just noticed that if you place three different groups of one Demon Vs one Human then this will happen:
Two of that group of three will be waiting until that random pick>> it picks one from that group, meaning that Two of the groups it can be (Human overlapping Demon) and both of them not getting hit for several seconds because the pick random didn't pick them yet so they can be there fighting each other but not getting Damage.
so basically this is a bigger problem than it looks jeje so now the question is how exactly you wanna to happen and how your game will be working, example:
will it be different groups of Demons vs Humans fighting far from each other example first group here and another group at a farther distance if so how you wanna resolve the hittings Damages pick every 2 secs Random from each group independently or just pick one (demon and one human) from all the objects and apply the damage, you need to be more concrete here because there are many scenarios that can happen that can break the logic that you wanted in the first place