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).