Ok thanks. I want to ask something about the "For Each" you previously mentioned.
So with the fixing of the run events, I finished the system of my basic enemies. I used instance variables to make the enemy move, attack, take damage and die. So I thought I can create multiple instances already of my enemy in the layout and they will behave (independent from each other) using the same events. But they did not.
I did not use a container (I have my own reasons why), but here is how I coded it:
I use families except for object specific events.
GoonBoxes (family name) - contains different goonbox objects, but I only have 1 object under this family at present
Goons (family name) - different objects in this, but only 1 goon coded (the one corresponding to the only goonbox I have so far)
+start of layout
->Goonbox (not the family) object spawns goon object (not the family)
an instance var for AI is randomized every 3 secs to 1 or 2 (for walking left and right) and it will keep walking left and right until it sees the enemy (this is when it will run towards player and attack it and goes back to stance and can go to run and/or attack again if the player is near). Distance from player is being checked every tick.
Attack animation uses object instead of family
+Goon's animation "Attack" is playing
+animation frame = 7
+Goon colliding with Playerbox
->Set Player to Damage (this isn't the real event, it's too long to type but you get the idea)
Then everything else is in instance variables.
So because it doesn't work for multiple instances, I tried adding "For Each GoonBoxes (family) object" condition to each and every single event related to my enemies, but I get an error about loop like this: http://oi62.tinypic.com/oswjf8.jpg
How do I fix this and make my enemies behave independently from each other using the same events?
I really thought the essence of instance vars was for this situation but ugh.... help please.