KamilSeven
Member
Hi!
I want to build a flying enemy motion planning for a side view game (Super Crate Box clone for learning purpose). I've tried using a simple motion planning line to achieve it. But the issue is, mp is creating the shortest path to the target, so it doesn't give the effect of flying/hovering to the character.
Here is an example of what I'm trying to achieve. Flying skull enemies and the way they hover and bounce while following the player position.
My simple code was based on Let's Learn GameMaker: Studio's tutorial.
I tried to tweak mp settings but couldn't get the result I'm after.
I want to build a flying enemy motion planning for a side view game (Super Crate Box clone for learning purpose). I've tried using a simple motion planning line to achieve it. But the issue is, mp is creating the shortest path to the target, so it doesn't give the effect of flying/hovering to the character.
Here is an example of what I'm trying to achieve. Flying skull enemies and the way they hover and bounce while following the player position.
My simple code was based on Let's Learn GameMaker: Studio's tutorial.
I tried to tweak mp settings but couldn't get the result I'm after.
GML:
///Mp Potential
goalx = obj_player.x
goaly = obj_player.y
//rotation in a step
var maxrot = 15;
//Check for collision
var rotstep = 10;
//Planning ahead
var ahead = 3;
//Rotate on spot
var onspot = true;
mp_potential_settings(maxrot,rotstep,ahead,onspot);
mp_potential_step_object(goalx,goaly,stepsize,obj_wall);
Last edited: