I always find myself in every single project I make to get the most headache over getting several objects of the same "class" to be linked together.
I usually get it to work somewhat from hours of trial and error, but it never feels like I have nailed it or that it is very robust. It often ends up more like a mess of code that I half understand in the end from all trial and error but *seem* to work.
What I mean is for example to have 10 enemy objects that each have an individual head and health bar "attached" to them.
So when something affects enemy number 3 the other "parts" of him react accordingly. For example when the character dies his head display its death animation and when his health is low his health bar starts to flash and so on. When he is destroyed the other parts gets destroyed with him.
Why is this so hard to get to work right without a lot of messy code? Or am I missing something? As far as I know the only way to do this is with fast loops?
Is there some easy "logical" way to do this that really work at all time? I think I found some good tutorial on this subject on Chris Burrows article site, but his site seems to be down now :/.