I have a Family of enemies who will all have line-of-sight characteristics. Given certain circumstances which can be true for ANY of the enemy types, I want to Pick Nth Instance of the Family instance. However, this doesn't seem to be working as I thought it would. And I theorize that it's because the Nth instnace might refer to the Nth EnemyOne or the Nth EnemyTwo. Same "N", but two different enemies despite being the in the same family.
I just want to ask if this theory is on par with how Families do (or don't) work. If my theory is correct, then I'm gonna have to learn how to use Functions...
Well, I didn't know the answer so I tried out a little example with debug just to see the order. 3 objectTypes, 6 objects, 1 family, and a forEach on the family. : capx
The result seems to prove that :
So using the IID in your case can be tricky, and using the UID and function instead could help, yes.
Here is a function that could do the trick, simulating a "pick Nth object" for a family. Problem is you have to rewrite it for every family...
<img src="https://photos-3.dropbox.com/t/0/AAAEfxtcRQmfJerPEgeVZvytQb3pJEaZXoQQ7euyTl2Vrw/12/113235847/jpeg/1024x768/3/1372237200/0/2/pickFamily.JPG/SEtxKiIgNsraMnJOeo4vY5ZMEqz69dchdmqkkXFQatI" border="0">
Develop games in your browser. Powerful, performant & highly capable.
Guizmus - Ah! Thank you. So obvious yet I'm so "skilled" at missing it. LOL Thank you for the work to check on that.