I'm creating a chase scene for my game and there are some moments where you can push objects to cover the enemy's path. The objects are like:
- They are pushed automatically when the player walks towards them (made with a player touch event that executes a parallel process with a self switch)
- They move to the opposite direction to player (move away from player in movement route)
I want the enemy to jump over the object and reach the other side in case there's one on it's way... How can I do this? Also the enemy uses a pathfinding command on it's movement routes:
where the variables are player's x position and player's y position
(Basically the think works correctly but I want the enemy to be able to jump over the objects so you can't block it's way)
- They are pushed automatically when the player walks towards them (made with a player touch event that executes a parallel process with a self switch)
- They move to the opposite direction to player (move away from player in movement route)
I want the enemy to jump over the object and reach the other side in case there's one on it's way... How can I do this? Also the enemy uses a pathfinding command on it's movement routes:
Code:
$gameMap._events[this._eventId].moveStraight($gameMap._events[this._eventId].findDirectionTo( $gameVariables.value(5),$gameVariables.value(6) ));
(Basically the think works correctly but I want the enemy to be able to jump over the objects so you can't block it's way)