A teraz? Mp grid działa przez środek kratek a nie na rogach.
GML
if o_bitwa.tura=postac && zaczal=0
{
with(o_drzewo) instance_destroy();
with(o_skala) instance_destroy();
with(r)
{
Path = path_add();
i=4
u=-1
gotow=0
Grid = mp_grid_create(0,252,20,7,64,64);
mp_grid_add_instances(Grid,o_walka_przeciwnik,true);
//gotow = mp_grid_path(Grid,Path,x,y,x+(i*64),y+(u*64),false);
gotow = mp_grid_path(Grid,Path,x+32,y+32,ob_obiekt.x+32,ob_obiekt.y+32,false);
path_set_kind(Path,true);
PathWidth = path_get_number(Path)-1;
other.PathWidth=PathWidth
if(gotow) && PathWidth<=other.ruch
{
instance_create(path_get_point_x(Path,PathWidth)-32,path_get_point_y(Path,PathWidth)-32,o_drzewo);
for(i=1;i<PathWidth;i+=1)
instance_create(path_get_point_x(Path,i)-32,path_get_point_y(Path,i)-32,o_skala);
}
other.ruch-=PathWidth
}
zaczal=1
}