📧 Message Board Archive

trying to attack
what is needed for the silver kights to attack properly? I have ,

sp_brain(&current_sprite,9);

sp_range(&current_sprite,50);

sp_distance(&current_sprite,60);

sp_touch_damage(&current_sprite, 8);

sp_base_attack(&current_sprite,720);

sp_speed(&current_sprite,3);

sp_target(&current_sprite,1);

Sp_base_walk(&current_sprite,290);

This knight is not hard, when the condition is met, he follows dink around , but doesn't hit Dink, just stops short of him. Does it matter what order these attributes are assign in?
Re: trying to attack
Try to add the following:



void main( void )

{

sp_brain(&current_sprite, 9);

sp_target(&current_sprite, 1);

sp_base_attack(&current_sprite, 720);

sp_base_walk(&current_sprite, 290);

sp_distance(&current_sprite, 55);

sp_range(&current_sprite, 50);

sp_strength(&current_sprite, 20);

sp_hitpoints(&current_sprite, 180);

sp_defense(&current_sprite, 13);

sp_nohit(&current_sprite, 0);

sp_speed(&current_sprite, 1);

sp_timing(&current_sprite, 0);

sp_touch_damage(&current_sprite, 15);

sp_exp(&current_sprite, 200);

}



void attack( void )

{

playsound(8, 5050,0,&current_sprite, 0);

&mcounter = random(4000,0);

sp_attack_wait(&current_sprite, &mcounter);



}



If you don't add sp_attack_wait(&current_sprite, &mcounter); the knight just hits all the time and doesn't usually even hit Dink. Of course add things with your own strength, defense etc. but this script at least should work.
Re: trying to attack
You might add the following (not necessary for all):



sp_hard(&current_sprite, 1);

sp_defense(&current_sprite, 3);

sp_strength(&current_sprite, 15);

sp_exp(&current_sprite, 50);

sp_base_death(&current_sprite, -1);

sp_hitpoints(&current_sprite, 200);



Also, it's not very good to have

sp_range(&current_sprite,50);

sp_distance(&current_sprite,60);



I might use

sp_range(&current_sprite, 50);

sp_distance(&current_sprite, 40);

instead. I believe sp_strength is for the attack damage, sp_distance is the distance the sprite would start an attack sequence, and sp_range is the damage range of knight's attack.







: what is needed for the silver kights to attack properly? I have ,

: sp_brain(&current_sprite,9);

: sp_range(&current_sprite,50);

: sp_distance(&current_sprite,60);

: sp_touch_damage(&current_sprite, 8);

: sp_base_attack(&current_sprite,720);

: sp_speed(&current_sprite,3);

: sp_target(&current_sprite,1);

: Sp_base_walk(&current_sprite,290);

: This knight is not hard, when the condition is met, he follows dink around , but doesn't hit Dink, just stops short of him. Does it matter what order these attributes are assign in?



Re: trying to attack
: You might add the following (not necessary for all):



:  sp_hard(&current_sprite, 1);

(BUT IT CANNOT MOVE IF IT IS HARD!)

:  sp_defense(&current_sprite, 3);



:  sp_strength(&current_sprite, 15);



:  sp_exp(&current_sprite, 50);



:  sp_base_death(&current_sprite, -1);



:  sp_hitpoints(&current_sprite, 200);



: Also, it's not very good to have



:  sp_range(&current_sprite,50);



:  sp_distance(&current_sprite,60);



: I might use



:  sp_range(&current_sprite, 50);



:  sp_distance(&current_sprite, 40);



: instead. I believe sp_strength is for the attack damage, sp_distance is the distance the sprite would start an attack sequence, and sp_range is the damage range of knight's attack.



: : what is needed for the silver kights to attack properly? I have ,



: : sp_brain(&current_sprite,9);



: : sp_range(&current_sprite,50);



: : sp_distance(&current_sprite,60);



: : sp_touch_damage(&current_sprite, 8);



: : sp_base_attack(&current_sprite,720);



: : sp_speed(&current_sprite,3);



: : sp_target(&current_sprite,1);



: : Sp_base_walk(&current_sprite,290);



: : This knight is not hard, when the condition is met, he follows dink around , but doesn't hit Dink, just stops short of him. Does it matter what order these attributes are assign in?



try making:



void attack( void )

{

         playsound(yoursound);

         preload seq(720);

         sp_nocontrol(&current_sprite,1);

         

}



Re: trying to attack
: : You might add the following (not necessary for all):



: : sp_hard(&current_sprite, 1);



: (BUT IT CANNOT MOVE IF IT IS HARD!)



: : sp_defense(&current_sprite, 3);



: : sp_strength(&current_sprite, 15);



: : sp_exp(&current_sprite, 50);



: : sp_base_death(&current_sprite, -1);



: : sp_hitpoints(&current_sprite, 200);



: : Also, it's not very good to have



: : sp_range(&current_sprite,50);



: : sp_distance(&current_sprite,60);



: : I might use



: : sp_range(&current_sprite, 50);



: : sp_distance(&current_sprite, 40);



: : instead. I believe sp_strength is for the attack damage, sp_distance is the distance the sprite would start an attack sequence, and sp_range is the damage range of knight's attack.



: : : what is needed for the silver kights to attack properly? I have ,



: : : sp_brain(&current_sprite,9);



: : : sp_range(&current_sprite,50);



: : : sp_distance(&current_sprite,60);



: : : sp_touch_damage(&current_sprite, 8);



: : : sp_base_attack(&current_sprite,720);



: : : sp_speed(&current_sprite,3);



: : : sp_target(&current_sprite,1);



: : : Sp_base_walk(&current_sprite,290);



: : : This knight is not hard, when the condition is met, he follows dink around , but doesn't hit Dink, just stops short of him. Does it matter what order these attributes are assign in?



: try making:



: void attack( void )



: {



:   playsound(yoursound);



:   preload seq(720);



:   sp_nocontrol(&current_sprite,1);



:  



: }



fixed
I had to add

int &mran = random ( 4000,1);

sp_attack_wait(&current_sprite, &mran);

//or something like that.

It seems to need extra time to swing the axe.

The random was coied from s3-gh(?)and was also used in s3-dorks. Thanks guys