I need an expert's advice!

I posted this before but I think the subject line wasn’t “attractive” enough…

I’m making an RPG with the following stracture:

on the main stage is a hud MC, inside it are status screens and the fight screen.
In the fight screen we have a figure of the hero character and 3 spots for enemies (it is calculated on the mainstage how many enemies will be in the fight and which enemies), the enemy MCs have inside them frames with different lables and different enemies accordingly.
To attack, the player first chooses an attack from another part of the hud, and then he has to click on which enemy he wants to attack, inside the attack animation of the hero character are actions like:


_root.trgt is defined when clicking on the button of one of the enemies (to choose which one to attack).

When an enemy dies, he substracts 1 from a variable that tells how many enemies are in the fight, and when it reaches 0, the battle is over.

Now here is the problem:

How will I make it so after I’ve killed one enemy, I can’t “kill” him again, and thus substracting another 1 from the variable of how many enemies on stage without attacking the other enemies?

I tried putting this in the end of the enemy’s death animation:

_root._parent._name = true;

And then on the enemy selection button I do something like this:

if(_root.enemy1!= true){
//do attack on enemy1

And so on with enemy2, 3… (every enemy has his own button)

But it didn’t help (_root._parent._name didn’t define a variable). I also tried to do _root.[_parent._name] but it returned a syntax error.

I hope I explained my self clearly enough, it’s very difficult to explain the situation without the actual source file (too big). I hope someone will be able to help me…

Here’s the unfinished game, this will give you a better idea of what’s going on: http://www25.brinkster.com/****ationhq/games/rpg.swf

curse that cursing system! the word in **** is dam n

Jeez I sometimes amaze me! :stuck_out_tongue:
I solved that problem myself.

However I still have one more problem: Anyone has an idea of how should I make the enemies retal?