Problem with multi lifebars/enemies

Hi,
I’m trying to create multiple lifebars for enemies using Health extension, linked and ‘for each’ objects. So far, it’s almost good, but there’s one problem that’s bugging me:

These are the events:

The goal: when I attack one of the enemies (in this case, the “tricera”), his lifebar shows, and when the health = 0, the lifebars is deleted, as well as the enemie (tricera).
My problem is: if I put more than 2 copies of the same enemie (tricera), the code is a little bit bugged. If I start by attacking the first one I put, and then attack the other one, it’s ok. I can even do some demage to the first, but not kill it, then do some demage to the other copies and it’s all good.
The real problem is when I try to attack, first, one of the copies. The lifebar shows (and it takes the first hit), but if i keep attacking just the copy, the code stop working (the “spell” is not deleted, and the enemie dont take any hit). They only can keep getting hit if I attack the first copy.

Anyone have a clue? It seems really a bug, or a matter of ‘order’, because it works perfectly fine if I start just hitting 1 time the first copy.
Oh, the ‘Enemy’ (for each is repeated) is a group of other enemies. I tried with multiple different enemies and the same thing occurs: I always have to do 1 hit first on the first copy before the others one can fully get hits as well (otherwise, if i start hitting the copies first, they can only take 1x).

Oh, I found the solution.
I’m going to post it here so if someone is trying to do the same thing, they can get it:

FYI: I’ve seen a couple of posts here in the community about this. 2 of them with a print of their events. None of them worked for me, and they were much larger than this one I’m posting.
Also, to clarify:
You can ‘copy’ this to as many same/different enemies you want, as long as they are in a group (in this case, the group Enemy).

1 Like

This will be useful to know, thank you!