Ok, the problem is you don't reset your variables. At the start of the game, gegner_attack is by default zero. All variables that weren't set are. That variable is used to prevent the actor from attacking while already attacking. The player and enemy can only lose the game when the other is attacking, and therefore that variable is set to one at the time. The actors involved are destroyed before the variable can ever be set back to zero, therefore stopping the ability to attack next game.
A tip if you don't already know. You can use text actors to help debug your game. What I used to find your problem was an sprintf of the variables I found in enemy -> collision with attack zone -> script editor. Here's the sprintf I used in a text actor I created.
text_display -> Draw Actor -> Script Editor
- Code: Select all
sprintf(text, "attack: %d\nattack_if: %d", gegner_attack, gegner_attack_if);
That way you can know what values those variables have, and determine yourself why the if statement isn't triggering.