Enemies share the same health pool

I got a little problem i implemented a little health system for the player and the enemies.
But my enemies share the same healthPool so if one gets damaged all recieving the damage…
At first both where prefabs/templates so i thought ok if this is the problem i just copy one enemy and adjusting the attributes to the ones representive of him self.
But this also results in the same problem am i missing something?

Hi @IlAce,

Try sharing more details on your implementation and if possible share your code. Most likely you are executing a do damage method on all enemies, instead on the one receiving damage.

sorry for not replying i missed the notification…

i try to specify more, so i followed the progressbar tutorial to get the healthbar done,
the Healthbar is atached to my enemy and defines the event.

if i collide with the enemy i just do this.app.on(‘EnemyHit’, function(damage){
//bcs progressbar has value 0 to 1 we just divide the damage taken with the players maxHp to get the coresponding number
//so we can just parse “normal” damage numbers for example 20 dmg on hit
var actDmg = damage / this.maxHp;
this.setProgress(this.progress - actDmg);