OK. A bit more info. Sorry for that. I manage combat with Group arrays, using 5 values.
Wood[0] Is for the Heroes in the 'World Map' <- These units have a change to engage combat.
Wood[1] Are the alive Creeps. <- Used to Count the Alive Creeps left to kill in the combat.
Wood[2] Are the heroes in the region where heroes fight with creeps
Wood[3] Are the heroes in the Circle of Power where they have to stand to restore their original positions in the World Map, and be added to Wood[0] again.
Wood[4] Are all the Neutral Hostile creeps are (Alive and dead) that are removed when all the heroes leaves the region.
When hero engages combat, I remove it from Wood[0] and add it to Wood[2]. When the hero leaves the combat region, I remove it from Wood[2] and add it to Wood[0] again.
When all the heroes in combat stand in the exit, their positions are restored using this condition:
-
(Number of units in Wood[2]) Equal to (Number of units in Wood[3])
The same happens with other regions (Beach, Swamp, City, Dungeon, etc.)
The thing is that when the hero dies, it's removed from all these groups. If I create a shade where the hero died, I need to add the shade to the same group the hero was in, so it can leave the combat region and go to a town to revive.
@Spinnaker: That's the problem
@Troll-Brain: No, i'm not =/
@Dr Super Good: You are too Super Good for me to understand what you said xD But thanks
While I was writing this I came with the idea of just reviving the hero just where it died, change it's transparency to 50%, disable all spells, attacks, items, etc., so it would me some kind of 'Dummy' hero, and restore all those values when the hero 'revives' (in town, with skill, or with item), and change it's model to the shade.