Hi, I was wondering if anyone knew how to make an enemy attack by jumping. Like, they jump towards one side, turn, then jump towards the other. when ever I try to do this it just ends up breaking my game.
I’m not sure if this is exactly what you were thinking, but I prototyped a jumping enemy based on your description.
Every two seconds the game updates, and the enemy’s x and y velocity changes to make him jump to different sides of the screen. I used if statements to change how much he jumps based on his location. Hopefully you can look at this and figure out how to add a jumping enemy to your game.
this is perfect, thank you