I kinda have this problem for a long time now. Okay, so imagine there are three movieclips:
- mcPlayer (you)
- mcBullet (things you fire)
- mcEnemy (has intHealth variable inside)
Where would I put the AS code where the enemy should receive damage? I could put it on the bullet, but how can I make the intHealth reduced? How do I "refer" to a certain duplicated enemy, or do I have to run a for loop for "mcEnemy"+i to check? Because that doesn't sound efficient.
If I put it inside mcEnemy (whether timeline inside it or mcEnemy itself), I have no idea how to refer to mcBullet, and having to run a for loop for mcBullet+i is also inefficient.
If I put it in the main timeline, I can't think of a way to refer to BOTH mcBullet and mcEnemy.
Help? :(