Here's where I put it, is this still correct? The logic seems to make sense to me, but the enemy always plays all four animation frames before switching to enemystate "attack".
[attachment=0:2um2sjtn][/attachment:2um2sjtn]
Could you tell me where I could find in the manual (or elsewhere) how to write the expression for checking if any of a number of animations have finished? Basically I want to do something like:
Enter the name of the animation that has finished: Animation: "enemykick1", "enemypunch1","enemypunch2" (that doesn't work of course)
I seem to be able to find everything I don't need to know, but never what I do.
I think I found the problem. You should put the overlapping condition before the other two, and use System -> Else.
Most of the time, if two sprites are overlapping, their X coordinates aren't necessarily equal, so, for example, let's say that your enemy is already walking right towards the player when you enter the base level event, and enemy_bbox is overlapping player_bbox, but is still a little to the left (enemy_bbox X < player_bbox.X). You first enter the "enemywalkR" subevent, and it waits for 0.1 seconds (I'm guessing that's enough for some frames of the animation that was already playing to play out), it starts playing the animation again and only then enters the stop event.