I have a bunch of solders in lines. And when they are selected they can be moved to a location of the mouse click. But the problem is if I have more than one group of solders selected and have them move. They move to the same location making one group disappear behind the other. I know why this is but don't know how to go about changing things so that they move to new location at different spots. maybe you can help me thank you.
basically this is what I have for the move code for all the units. They just all have a spot to move to based on the main spot I have put bellow called Midle. If you need more code I can provide but I left it out due to me not thinking it important to question.
//// in units step event
if mp_grid_path(grid,global.AMpath, x, y, Midle.x, Midle.y, 1)
{
path_start(global.AMpath, global.MSpeed, 0, 0);
}
///// in Midle objects global left pressed event
x=mouse_x
y=mouse_y}
basically this is what I have for the move code for all the units. They just all have a spot to move to based on the main spot I have put bellow called Midle. If you need more code I can provide but I left it out due to me not thinking it important to question.
//// in units step event
if mp_grid_path(grid,global.AMpath, x, y, Midle.x, Midle.y, 1)
{
path_start(global.AMpath, global.MSpeed, 0, 0);
}
///// in Midle objects global left pressed event
x=mouse_x
y=mouse_y}