This is the code Im using so far, is very simple, Im just using gm's fucntions, but are not what I want, heres the code:
a = check_nearest(obj_dummy);
if place_free(x+5,y) && place_free(x-5,y) && place_free(x,y+5) && place_free(x,y-5)
{move_towards_point(a.x,a.y,2.5)};
else
{mp_potential_step(a.x,a.y,0.5,1);}
Don't worry about the check_nearest script, it checks the nearest enemy (if you want this code pm me its very usefull), so if you can please help.











