Najprościej?
GML
if distance_to_object(o_hero)>30 mp_potential_step(o_hero.x,o_hero.y,5,0)
if instance_exists(o_wrog)
{
wrog=instance_nearest(x,y,o_wrog)
direction=point_direction(x,y,wrog.x,wrog.y)
}
else direction=point_direction(x,y,o_hero.x,o_hero.y)
Do tego dodaj strzelanie, i może zadziała ;p