Ok so I have it set up so that I can press space to make a wave-slash type attack at my enemies.
Its also set up so that when I touch an enemy it damages me... I would like to have a delay so that I can't just spam the space button and instantly kill my enemy
I also want it so that my enemies will not kill me the second I touch them, I want like a knockback effect and a delay between the damage i take, something like invincibility frames for both me and the enemies. Cause sometimes when I attack, it's not supposed to instantly kill the enemy but sometimes it does. I'm thinking its because the enemy is in constant contact with the attack because it's trying to run at me, so it's running into the slash so it's constantly taking damage, and this kills it instantly. I believe I need a sort of delay so that it doesn't instantly die, like a delay so that its health doesn't just run down instantly due to constant contact. And I'd also like this for my player as well, because I die due to constant contact with the enemy, if I'm unable to get away from it. For this I wanted a knockback effect of some kind.
Also, i have a shield button that is set to shift; I was wondering if there was a way to make it so that as long as i hold down the shift button, the shield will be there blocking anything; and when I let it go, the shield goes away.
My game link is here: http://flowlab.io/game/view/733749
Thanks in advance