Sprite - all directions
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.
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.
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.
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.
Ah, ok. I wasn't too sure about the attack directions. Thanks.
Wellllllll... it might be possible.
void attack(void)
{
// buncha math to attack in 9 directions
}
void attack(void)
{
// buncha math to attack in 9 directions
}
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?
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?
/me smacks forehead.
I broke it. Sweet. It'll be fixed in RC3.
At least you caught it.
I broke it. Sweet. It'll be fixed in RC3.
At least you caught it.
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.
up, down, right, left, upleft, downleft, upright, downright, ???.
Where is this ninth direction?
tia, mm.
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.