• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

mp_potential_step, I need tank-like behaviour

Hi guys

I need my instance to stop and turn like a tracked vehicle when it sees an obstacle in front of it (or further away, as set by the command below). When just using the normal setup, the instance will just "glide" around the obstacle. Instead of this, I want the instance to stop, turn (image_angle) toward the new "route" and then move - doing this until it reaches it target.

Create event:
GML:
mp_potential_settings(50, 1, 1, true);
Step event:
GML:
mp_potential_step(target.x, target.y, 1, false)
Any advice would be appreciated!
 
Top