Enemy Knockback Problem
Posted: Wed May 20, 2015 10:20 pm
Hey Gang!
I'm trying to make a little fighting game and I'm very happy with what I have right now.
The problem is that if I attack the enemy from the left side and he is looking left, the knockback won't work.
It works fine from the right side and from both sides if the enemy is looking right.
Maybe someone has time to look over my code. I tried to keep it as simple as I can.
The green character is controled by the left and right arrow keys and "x" for jumping und "c" for attacking.
If something else is wrong with the code, please feel free to tell me.
Thank you guys and greetings from Berlin
- Alex
I'm trying to make a little fighting game and I'm very happy with what I have right now.
The problem is that if I attack the enemy from the left side and he is looking left, the knockback won't work.
It works fine from the right side and from both sides if the enemy is looking right.
Maybe someone has time to look over my code. I tried to keep it as simple as I can.
The green character is controled by the left and right arrow keys and "x" for jumping und "c" for attacking.
If something else is wrong with the code, please feel free to tell me.
Thank you guys and greetings from Berlin
- Alex