I'm trying to make NPCs detect enemies using c_scan. This works when there's only one copy of the NPC, but when there are 2 next to each other, they can't find the enemies. This is because c_scan looks for the closest entity, which in the NPC's case, is the other NPC, rather than an enemy.

Is it possible to force c_scan to continue searching further and further if nothing can be found? That is, if this NPC's skill, "Team," is set to 1, then the c_scan finds the next closest thing, and continues searching until it finds something that has Team set to 2. Is that possible?

Thanks.