So here's my idea behind this. I've got a sprite with a turret behavior and a private var called faction. Is it possible to add turret targets based on that private var or perhaps based on animation?
Sprite Ship1, faction: purple (animation purple, random frame)
- Add all Ship1 sprites, which are of faction red to the turret targets of faction purple
Sprite Ship1, faction: red (animation red, random frame)
- Add all Ship1 sprites, which are of faction purple to the turret targets of faction red
- Or add all Ship1 sprites which are running a different animation as the one I want to add the target to
family Enemyships.faction != Ship1.faction OR family Enemyships.AnimationName != Ship1.AnimationName
-> Ship1 Add target (Enemyships) to turret targets
This seems to add all the ships, because it is family. Including their own faction and itself to the turret target list. Isn't this possible, using just one Sprite container for this...
In short:
Can you select two sprites from Ship1 and separate them somehow based on their private var (faction) or AnimationName
Maybe one more question, is it somehow possible to see a turret's targets in some kind of list?