The Dink Network

Moving Dink to...

November 27th 2004, 09:02 AM
duck.gif
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?
November 27th 2004, 09:21 AM
fairy.gif
Glennglenn
Peasant He/Him Norway
GlennGlenn doesn't want a custom title. 
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
November 27th 2004, 09:31 AM
pq_frog.gif
Ric
Peasant They/Them Canada
 
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(&current_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.
November 27th 2004, 10:33 AM
duck.gif
quote: If Dink already is past the coordinate, the script skips to the next line, so he doesn't go back and forth

I didn't know that thanks!