I encountered a problem yesterday regarding families.
So basically I got an "enemy" family where I put all different types of enemy sprites. (they all get assigned a new ID on spawn and also a hitbox with the same ID)
I compared the distance between my player and the family "enemy" to make the enemy do something when you come close. At first it didn't work, before I finally added "for each enemy" to it.
In all other cases, where I do not use distance/position, the code works just fine with the family.
So why exactly does this happen, or how do families work in this case?
Are there any other cases where I should concern adding "for each"?