Does mp_potentiel_path_object work on a tile index

I made this command unfotunately it doesnt seems to understand the obj as a final argument but it doesnt send an error so it might work and i made a mistake or it absolutely doesnt and im screwed...

Code:
   if (mouse_check_button_released(mb_left)) {
        state = states.walking
       
      

        if (instance_exists(Goal)) {
        instance_destroy(Goal)
        }


        instance_create_layer( mouse_x, mouse_y, layer, Goal)
        var Player_path = path_add()
        show_debug_message(global.tile_sprite)
        mp_potential_path_object(Player_path, Goal.x,Goal.y,3,4,global.tile_sprite > 1)
        path_start(Player_path, 3 , path_action_stop, false)
}
knowing that the global.tile_sprite is defined here
Code:
var tiledata, screenX, screenY, tileindex, tileZ;

for (var tX = 0; tX < Map_w; tX++)
{ 
   
    for (var tY = 0; tY < Map_h; tY++)
    { 
        tiledata = global.theMap1[# tX, tY];
        screenX = Script2(tX, tY);
        screenY = Script3(tX, tY);
       
        tileindex = tiledata[tiles.sprite];
        tileZ = tiledata[tiles.Z];
        if (mouse_check_button_pressed(mb_left))
        {
            if (screen_to_tile_x(mouse_x,mouse_y)== tX) && ((screen_to_tile_y(mouse_x,mouse_y) == tY) )
        {
       
        tile_get_index(tileindex)
   
        global.tile_sprite = tileindex
   
       
        }
        }
       
        if (tileindex != 0) { draw_sprite(tile,tileindex - 1 , screenX, screenY + tileZ)}
       
    }
   
}
 

TheouAegis

Member
Is Goal the name of an object, or is it a variable holding some non-objectyindex value?

And no, tiles aren't objects.
 
I've tried but the probleme is i'm doing a grid in isometric view and there is no such thing as an isometric grid function in game maker so i cant
 
Top