So i'm working on my little "fighting game scene" and i've run into this little problem now.
I need an Enemy or the Player to fall back after a Kick, falls to the left side or right side only, and stand up again, death animation is already done (just animated that). So i was thinking something along in theory that is "cEnemy1.Move.x++, or if getting hit from other side/player kick/Loop cEnemy1.Move.xx--;", but that synthax do not exist of course, too my knowledge.
. but the ++; being instead perhaps 20px to x, or -20px if the enemy get's hit from the other side.
So i'm thinking just to animate the Z motion in photoshop of the enemy/player instead of scripting a falling curve (unless a basic function is simplistic ofc) and have the X motion be in code, only. Any code suggestions would be very helpful!
A custom function for this would be useful since it will most likely be used for a lot of animations
Any suggestions how that would look like are very much welcomed!
I need an Enemy or the Player to fall back after a Kick, falls to the left side or right side only, and stand up again, death animation is already done (just animated that). So i was thinking something along in theory that is "cEnemy1.Move.x++, or if getting hit from other side/player kick/Loop cEnemy1.Move.xx--;", but that synthax do not exist of course, too my knowledge.

So i'm thinking just to animate the Z motion in photoshop of the enemy/player instead of scripting a falling curve (unless a basic function is simplistic ofc) and have the X motion be in code, only. Any code suggestions would be very helpful!
A custom function for this would be useful since it will most likely be used for a lot of animations
