The Dink Network

Sprite - all directions

January 5th 2006, 08:51 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
Yes. I'm asking a lot of questions.

But I can't seem to find a way that a sprite walks in all directions, like dink. I want a creature to walk around the screen in all directions, and also be able to attack in all directions. I know this is possible, I just don't see how, there is no brain for it.
Help is very appreciated.
January 5th 2006, 09:00 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Uh... it isn't possible.

In 1.08, it is possible for sprites to follow or target other sprites using all 9 directions (with set_smooth_follow(1) ).

But, attacks must always occur in the directions 2, 4, 6, and 8.
January 5th 2006, 09:03 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
Ah, ok. I wasn't too sure about the attack directions. Thanks.
January 5th 2006, 09:17 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Wellllllll... it might be possible.

void attack(void)
{
// buncha math to attack in 9 directions
}
January 5th 2006, 09:38 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
But if that's worth the pain...
January 5th 2006, 10:33 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
I tried the set_smooth_follow(1); thing, but it doesn't make a difference in how they follow me...

I used this in the main procedure:

sp_follow(¤t_sprite, 1);
set_smooth_follow(1);
sp_distance(¤t_sprite, 0);

sp_distance may have nothing to do with it, and I believe it automatically sets to 5 anyway, but yeah.

So how can I make set_smooth_follow work?
January 5th 2006, 10:54 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
/me smacks forehead.

I broke it. Sweet. It'll be fixed in RC3.

At least you caught it.
January 12th 2006, 02:10 AM
dinkdead.gif
millimeter
Peasant He/Him Canada
Millimeter is Wee-Lamm, Recording Artist. :-) 
Uhmm, I may be braindead but I cannot fathom this ninth direction. I'm thinking...
up, down, right, left, upleft, downleft, upright, downright, ???.
Where is this ninth direction?

tia, mm.

January 12th 2006, 06:58 AM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
There are 8 directions, but I think Redink kind of got 8 directions and direction 1-9 (which means 1,2,3,4,6,7,8,9) mixed up.
January 12th 2006, 05:09 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Aye, I wasn't thinking clearly.