Hey there guys! I'm currently working on a pretty simple side scrolling fighting game (think Streets of Rage, Golden Axe, Castle Crashers etc) and i've hit a bit of a problem. The main character has three hit points, and each time you take damage i've managed to make the character fade out for a half second, but one thing I really wanted to do was to make it so once you took a hit, you jumped backwards a bit.
I did have something working with a weird bit of Player.X(-40) coding or something similar (I don't know the first thing about coding, haha) but it didn't work. I feel like i'm missing something simple, but any help would really be appreciated!
This is the current very barebones testing version that I threw together just to show a friend, but i'll put it here just in case it helps at all.
(arrow keys move, A is attack, all you can do at the moment is run, jump, kill, and die)
Thank you for any help you can give me!