The Dink Network

Reply to I need some help, guys

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
July 23rd 2009, 07:20 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
I know how to make a script spawn to another script, like this
spawn("someotherscript")
but how can I make the script so after certain amount of time, it spawns to the other script again?

Here's my script now:

//THE DUCK!!

void main(void)
{
//the duck's standard things
say("`%YOU WILL NEVER WIN, SMALLWOOD!!", &current_sprite);
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 3);
sp_exp(&current_sprite, 500);
sp_base_walk(&current_sprite, 20);
sp_base_death(&current_sprite, 111);
sp_touch_damage(&current_sprite, 10);
sp_hitpoints(&current_sprite, 800);
preload_seq(131);
preload_seq(133);
preload_seq(141);
preload_seq(143);

if (random(2,1) == 1)
 {
 sp_target(&current_sprite, 1);
 }
spawn("duckstuff")
}

void hit( void )
{
//lock on to the guy who just hit us
sp_target(&current_sprite, &enemy_sprite);
//play the "Quack!" sound
    Playsound(21,22050,0,0,0);
}
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","small");

}

}

(the die prodecue isn't completed yet)

So, as you can see, the script would spawn to another script named "duckstuff", but how can I make it to spawn to the "duckstuff" after 10 seconds, again? This would need to continue as long, until the enemy is dead.

Thanks,
Skull