The Dink Network

sprite motion help!!!

July 11th 2008, 03:06 PM
maiden.gif
nawal
Peasant She/Her Egypt
 
I'm having a problem with my windinkedit or so i believe. the sprites that i add, say an enemy knight that is supposed to say something, screenlock, and start attacking me only plays the walking sequence and stays in his place! this goes for any other sprite i try to put, they look like they're walking but they're not moving from their place. do u know what seems to be the problem?
July 11th 2008, 03:52 PM
pq_cthunik.gif
GOKUSSJ6
Peasant He/Him Poland
Everyone should get a pizza for free in each week. 
It's easy...First give him Base_Walk(If you have a plus version press Auto) then give him Brain 16 and finally a script.
July 11th 2008, 07:02 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
It's possible that you have the hardness set to 0. Set it to 1.
July 11th 2008, 08:05 PM
boncag.gif
Znex
Peasant He/Him Australia
Oh hey. 
I've got that kind of script. Just make this a script:

====

void main(void)
{
int &knight = create_sprite(640, 0, 0, 290, 1);
freeze(&knight);
sp_dir(&knight, 1);
sp_base_walk(&knight, 290);
sp_speed(&knight, 2);
sp_target(&knight, 1);
wait(200);
say_stop("`7Bla bla bla bla bla bla bla.", &knight);
wait(200);
stopmidi();
playmidi("(mid).mid");
sp_script(&knight, "knight");
screenlock(1);

unfreeze(1);
unfreeze(&knight);
}

====

Then attach it to some inanimate object. You won't need the knight sprite(heh, rhymes!) for this script. Then you put this in the knight script:

====

/Normal soldier(quite easy)

void main( void )
{
screenlock(1);
int &mcounter;
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 2);
sp_distance(&current_sprite, 40);
sp_timing(&current_sprite, 33);
sp_exp(&current_sprite, 60);
sp_base_walk(&current_sprite, 290);
sp_base_attack(&current_sprite, 720);
sp_defense(&current_sprite, 1);
sp_strength(&current_sprite, 8);
sp_touch_damage(&current_sprite, 2);
sp_hitpoints(&current_sprite, 40);
sp_target(&current_sprite, 1);
preload_seq(291);
preload_seq(293);
preload_seq(295);
preload_seq(297);
preload_seq(299);

preload_seq(722);
preload_seq(724);
preload_seq(726);
preload_seq(728);

}

void hit( void )
{
say("`7Why you little...", &current_sprite);
sp_target(&current_sprite, &enemy_sprite);
//lock on to the guy who just hit us
//playsound

}

void die( void )
{
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 6);

&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);
external("emake","medium");

if (get_sprite_with_this_brain(9, &current_sprite) == 0)
{
screenlock(0);
}
}

void attack( void )
{
playsound(8,8000,0,&current_sprite,0);
say("`7DIE!!", &current_sprite);
&mcounter = random(4000,0);
sp_attack_wait(&current_sprite, &mcounter);
}

====

You can customise it a bit if you want.
July 12th 2008, 04:48 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
The important question is: Has the knight got a speed value higher than 0? It needs at least a value of 1 to move.