The Dink Network

An issue with only Diag.

July 31st 2002, 02:38 PM
anon.gif
bdjnk
Ghost They/Them
 
I want dink to only be allowed to move in Diagonal, problem is that the this is one of those aspects of the game that don't seem changable...

I have a few ideas but they aren't working and now I am fed up, can anyone think of a way to impose diagonals only onto dink.

I had one thought I didn't try which was to keep the mouse in the game and place another sprite on the screen completely controlable by the keyboard, ugh, but even to me that sounds too complicated.

If anyone has an idea let me know.
July 31st 2002, 03:21 PM
wizardg.gif
Paul
Peasant He/Him United States
 
Here's one idea.

void main( void )

{

script_attach(1000);

int &dx;

int &dy;

int &ldx;

int &ldy;

loop:

&dx = sp_> 1, -1);

&dy = sp_y(1, -1);

if (&dx == &ldx)

&dy = &ldy;

if (&dy == &ldy)

&dx = &ldx;

sp_> 1, &dx);

sp_y(1, &dy);

wait(1);

&ldx = &dx;

&ldy = &dy;

goto loop;

}

But it look horrible and warps dink strangly if he try to walk off the screen in a cardinal dirction (i.e. not diagonal).
July 31st 2002, 03:24 PM
wizardg.gif
Paul
Peasant He/Him United States
 
Stupid emiticons, Let's see...

void main( void )

{

 script_attach(1000);

 int &dx;

 int &dy;

 int &ldx;

 int &ldy;

loop:

 &dx = sp_x 1, -1);

 &dy = sp_y(1, -1);

 if (&dx == &ldx)

   &dy = &ldy;

 if (&dy == &ldy)

   &dx = &ldx;

 sp_> 1, &dx);

 sp_y(1, &dy);

 wait(1);

 &ldx = &dx;

 &ldy = &dy;

 goto loop;

}

If that still doesn't work, I'm sure you can figure out what it's supposed to say since the next line has sp_y.