Moving Dink to...
Here's the situation, I want dink to walk towards a friend of his (x:186, y:192)
But it has to be put in the main function, so the place where dink stands isn't defined..
How can I solve this problem?
But it has to be put in the main function, so the place where dink stands isn't defined..
How can I solve this problem?
I know how to solve it, but it can be hard to explain. lets try.
You must make dink walk to the other point where he is going to stand before he walks to his friend.. I may be wrong, but I`m trying to help
You must make dink walk to the other point where he is going to stand before he walks to his friend.. I may be wrong, but I`m trying to help

I've done that.
I used two moves to get it to the right y axis, then two to get it to the right X. This takes him to the center of the screen:
sp_freeze(1);
move_stop(1,2,200,1);
move_stop(1,8,200,1);
move_stop(1,6,300,1);
move_stop(1,4,300,1);
sp_dir(1,2);
If Dink already is past the coordinate, the script skips to the next line, so he doesn't go back and forth. But are there objects in the way? And with a bit of tinkering, this may work better with diagonals.
The other thing you could do is put some large invisable objects around the screen each with a touch script something like:
void touch()
{
if(&story < 3){return;}
sp_touch_damage(¤t_sprite,0);
sp_freeze(1);
move_stop(1,2,200,1);
}
A few of these could 'shepard' Dink to his friend. But of course &story would need to be >= 3 for him to get out.
I used two moves to get it to the right y axis, then two to get it to the right X. This takes him to the center of the screen:
sp_freeze(1);
move_stop(1,2,200,1);
move_stop(1,8,200,1);
move_stop(1,6,300,1);
move_stop(1,4,300,1);
sp_dir(1,2);
If Dink already is past the coordinate, the script skips to the next line, so he doesn't go back and forth. But are there objects in the way? And with a bit of tinkering, this may work better with diagonals.
The other thing you could do is put some large invisable objects around the screen each with a touch script something like:
void touch()
{
if(&story < 3){return;}
sp_touch_damage(¤t_sprite,0);
sp_freeze(1);
move_stop(1,2,200,1);
}
A few of these could 'shepard' Dink to his friend. But of course &story would need to be >= 3 for him to get out.