The Dink Network

Little script question

January 3rd 2003, 05:53 PM
old.gif
I wanna make dink walk to somebody and then automaticly attack him once! NOTE: Freeze(1); is active, so I wanna have:

void main(void)

{

//Dink moves too sprite

attack command

//dink moves back to original place, I know the move commands, but what is the attack command?>

Is it possible?
January 3rd 2003, 11:15 PM
spike.gif
It is possible, but you must do it like this:

void main(void)

{

move_stop(1, 8, 100, 1); (let's suppose the sprite's up there)

sp_brain(1,0);

sp_seq(1,108);

sp_pframe(1,1);

wait(150);

playsound(hitsound, whatever it is)

wait(500);

sp_brain(1,1);

move_stop(1, 2, 400, 1);

freeze(1);

}

This would work if you want Dink to hit the sprite, if something else you must change the seq Dink does. As far as I know, there's no own command to make Dink attack. (NOTE: Dink unfreezes after he has moved to the correct spot, if he hasn't brain 0 or something else than 1)
January 4th 2003, 02:11 AM
old.gif
Kk, then I cannot do it... Mmm, this will be tricky
January 4th 2003, 04:09 AM
peasantmg.gif
ehasl
Peasant He/Him
 
: Kk, then I cannot do it... Mmm, this will be tricky

Hey.. Can't you just give him barin 9, then sp_target(1, &the_sprite_he_should_attack)?
January 4th 2003, 07:53 AM
knightg.gif
WC
Peasant He/Him United States
Destroying noobs since 1999. 
: : Kk, then I cannot do it... Mmm, this will be tricky

: Hey.. Can't you just give him barin 9, then sp_target(1, &the_sprite_he_should_attack)?

Yes, but he could attack more then once. Just make him walk up to that current sprite, and run the punch sequence. Works.

January 4th 2003, 10:56 AM
wizardg.gif
Paul
Peasant He/Him United States
 
: I wanna make dink walk to somebody and then automaticly attack him once! NOTE: Freeze(1); is active, so I wanna have:

: void main(void)

: {

: //Dink moves too sprite

: attack command

: //dink moves back to original place, I know the move commands, but what is the attack command?>

: Is it possible?

Can't you just basically copy the code out of use() on a weapon script?

January 5th 2003, 03:55 AM
peasantmg.gif
ehasl
Peasant He/Him
 
: : : Kk, then I cannot do it... Mmm, this will be tricky

: : Hey.. Can't you just give him barin 9, then sp_target(1, &the_sprite_he_should_attack)?

: Yes, but he could attack more then once. Just make him walk up to that current sprite, and run the punch sequence. Works.

Yeay, maybe, but i think something with "void hurt(&the_sprite_he_should_attack, &damage_he_should_get)" (i'm not sure about the order of the integers here...) would be nice... wait... is he supposed to damage the other character?