The Dink Network

Kung-fu fighting!

December 9th 2009, 05:23 AM
dragon.gif
Quiztis
Peasant He/Him Sweden bloop
Life? What's that? Can I download it?! 

int &pill = create_sprite(113,300, 9, 854, 1);
sp_nodraw(&pill,1);
int &flash = create_sprite(113, 300, 7 , 167, 1);
sp_seq(&flash,167);
wait(25);
sp_nodraw(&pill,0);
wait(50);
sp_script(&pill, "en-shdw2");
wait(200);
int &pill = create_sprite(113, 92, 9, 854, 1);
sp_nodraw(&pill,1);
int &flash = create_sprite(113, 92, 7 , 167, 1);
sp_seq(&flash,167);
wait(25);
sp_nodraw(&pill,0);
wait(50);
sp_script(&pill, "en-shdw2");
wait(200);
// Something here that until the &pills are dead, the script continues.
int &wiz = create_sprite(660, 114, 0, 581, 1);
say("`9Ok, I've had enough of you!" , &wiz);


2 monsters are summoned. I want the script to halt until Dink have killed the monsters, then continue with int &wiz. Should be an easy task, but guess mah braiiznnnznnnzzz izzz ouuuttt feeer a waaaaalk...
December 9th 2009, 06:50 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
I would take a completely different approach here. Just put a little check in the pillbug script to check whether the pillbugs are dead and then run a different scipt with the &wiz information, something like this:

en-shdw2.c
void die(void)
{
if (get_sprite_with_this_brain(9,&current_sprite) == 0)
{
spawn("newscript");
}
}


And then you make a new script:

void main(void)
{
int &wiz = create_sprite(660, 114, 0, 581, 1);
say("`9Ok, I've had enough of you!" , &wiz);

<rest of commands>

kill_this_task();
}
December 9th 2009, 07:53 AM
dragon.gif
Quiztis
Peasant He/Him Sweden bloop
Life? What's that? Can I download it?! 
Hm, I'll give it a go.