Again, thank you, but - hey I'm sorry for this - I'm still in trouble... simply because, I don't actually really get how For each works.
Actually...
The thing I'm wondering the most about is that my two other enemies, the Jumper and the Toothmate (great names uh ? ), do not got me with such a problem. To get their behaviour fast, once Jumper has been discovered on screen it simply jumps on regular times, and the Toothmate simply walks left then after a short amount of time walks right and repeats the process.
When I say I didn't have such trouble, I mean by that that, as it should be the case for the Crasher, the enemy that's getting me crazy, each instance of 'em acts individually. For example, the Jumper. It also uses Instance Variables that are mostly made to make the waiting time between its jumps regular. And that works ! They do not all jump strictly at the same time, because this actually depends on the time they first appeared on-screen (they do not move until they're seen by the player).
However, the Crasher gets me into trouble. What I would like to happen :
- The actions that are triggered by the player being closed to a crasher should ONLY be triggered on the Crasher the player's close to. Furthermore, it should act separately from the others - which isn't the case, strangely.
What happens :
- Only the instance that I put first in the layout, i.e Crasher #0 in Debug Mode, works well. The others seem to be nothing but kind of decoys. They do not move, except that they jump at the same time at the working one and sometimes also shoot (this is not random, but it seems they shoot only one Crash Bomb before completely stopping). They do harm me with contact damage as the working one, and their Health Instance Variable do lower when I attack them, indeed destroying them when their health reaches 0, but they do not shoot, only does the #0. If you can explain me more precisely how I should use "For Each", I would be SO thankful of you.
By the way, I am really sorry that I get in trouble that much...