I'm making a platformer game and I am trying to design an enemy effected by gravity that follows the player and when it gets close, it jumps forward. I've been having trouble with it and need help.
Printable View
I'm making a platformer game and I am trying to design an enemy effected by gravity that follows the player and when it gets close, it jumps forward. I've been having trouble with it and need help.
If you got something with your enemy so far you can maybe share it and we can give some hint on the jumping part?
Or is it something to design from scratch?
(i.e. which kind of movement are you using for the enemy, if any?)
I've been trying to use the bouncing ball movement with events that read: "if enemy's X > than Player's X: change direction to right" and "if enemy's X < than Player's: change direction to left" since i want to have the enemy walking (or at least appearing to) on the ground. It works pretty well, but how do I check the enemy's proximity to the player in order to do the jumping? EDIT: I'd also like to make the enemy stop when it's next to a gap, kind of like red koopa's from the mario games.