-
Actually, Multiple Enemy Lifebars ( assuming you mean each enemy has their own personal lifebar hanging abovr their head ) can be achieved without any looping at all.
If you follow the link in my previous post ( Automatic Object Pairing and Data Leeching ), i explain exactly how in detail, and there is even an online example illustrating that it works!
This auto pairing method ^ doesnt require any looping at all, but is slightly less flexible since you need to keep the number of Parrent and Child Objects equal for the system to work.
You can off cource make the Chillds/ Parrents invissible.
But destroying them clutters up the system and makes it missbehave.
But yeah, you can use ForEach loops or any other kind of loops to Pair Objects together manually as well.
-
Even though I know how to use both methods I think I'd still prefer to use ForEach. I know that loops are considered a deadly evil sin but they really aren't that bad in small doses.
It's much easier keeping track of things in a ForEach than with object pairing. Not to mention the ForEach object already cuts down on the amount of looping that needs to be done, so it's about as efficient as you can get when it comes to loops.
It all really depends on your project though and your comfort level with handling automatic pairing.
-
I have read your blog on object pairing and data leeching King_Cool, and now my question box is empty.
This may be the last thread I will make for a long time, so I thank you all for your assistance!