I'm trying to use a family for my npcs to simplify certain events, and I'm having trouble figuring out a way to do this line of code:
For each NPCS (family)
- distance(Sprite1 & Sprite2) < 100
- - (action) - - Set Variable to 1
- distance(Sprite1 & Sprite2) > or = 100
- Trigger Once While True
- - (action) - - Set Variable to 0
So if there are multiple NPCS on the screen, it's always calculating that the player is > 100 pixels away from at least one of them, so the variable is always set to 0.
If I switch the family for any sprite, it works fine (for obvious reasons). Is this something you can't do with a family?