The Dink Network

Reply to I no longer suck *that* bad

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:
 
 
September 18th 2007, 03:55 PM
duckdie.gif
Here it is, at last. Enjoy, and apologies for the delay.

(To make it worse, it got corrupted while I was copying & pasting. Hopefully it's fixed now.)

void main(void)
{
int &duckspeed;
int &duckx;
int &ducky;
sp_hitpoints(&current_sprite, 0);
sp_brain(&current_sprite, 3);
sp_base_walk(&current_sprite, 20);
sp_speed(&current_sprite, 1);
}

void hit(void)
{
&duckspeed = sp_speed(&current_sprite, -1);
&duckspeed += 1;
if (&duckspeed == 6)
{
goto chase;
}
sp_speed(&current_sprite, &duckspeed);

//Bleeding script
&duckx = sp_x(&current_sprite, -1);
&ducky = sp_y(&current_sprite, -1);
int &bledir = random(2, 1);
if (&bledir == 1)
{
int &junk1 = create_sprite(&duckx, &ducky, 0, 188, 1);
sp_seq(&junk1, 188);
}
else
{
int &junk1 = create_sprite(&duckx, &ducky, 0, 189, 1);
sp_seq(&junk1, 189);
}

return;

chase:
freeze(1);

//Make Dink disappear and have his clone chase the duck
//The clone will appear where Dink currently is
int &duck = &current_sprite;
int &dx = sp_x(1, -1);
int &dy = sp_y(1, -1);
sp_nodraw(1, 1);
int &clone = create_sprite(&dx, &dy, 16, 12, 1);
sp_base_walk(&clone, 70);
sp_speed(&clone, 6);
sp_timing(&clone, 33);
sp_follow(&clone, &duck);
set_smooth_follow(1);
freeze(&current_sprite);

//You can increase the numbers below to make the chase faster
//Remember that the duck is faster than Dink at first
sp_speed(&current_sprite, 12);
sp_speed(&clone, 9);

&duckx = sp_x(&current_sprite, -1);
&ducky = sp_y(&current_sprite, -1);
if (&duckx <= 320)
{
goto chase1;
}
else
{
goto chase2;
}
chase1:
if (&ducky <= 200)
{
//The duck is in the upper-left quarter of the screen

//Chase - you can make it last longer if you wish
move_stop(&current_sprite, 2, 318, 1);
move_stop(&current_sprite, 6, 450, 1);

//Have Dink catch up with the duck
sp_speed(&current_sprite, 8);
move_stop(&current_sprite, 8, 90, 1);

//Get the real Dink back and destroy the clone
int &dinkx = sp_x(&clone, -1);
int &dinky = sp_y(&clone, -1);
int &dinkdir = sp_dir(&clone, -1);
sp_x(1, &dinkx);
sp_y(1, &dinky);
sp_dir(1, &dinkdir);
sp_nodraw(1, 0);
sp_kill(&clone, 1);

//Insert mother duck cutscene here

return;

}
else
{
//The duck is in the lower-left quarter of the screen

//Chase - you can make it last longer if you wish
move_stop(&current_sprite, 6, 450, 1);

//Have Dink catch up with the duck
sp_speed(&current_sprite, 8);
move_stop(&current_sprite, 8, 90, 1);

//Get the real Dink back and destroy the clone
int &dinkx = sp_x(&clone, -1);
int &dinky = sp_y(&clone, -1);
int &dinkdir = sp_dir(&clone, -1);
sp_x(1, &dinkx);
sp_y(1, &dinky);
sp_dir(1, &dinkdir);
sp_nodraw(1, 0);
sp_kill(&clone, 1);

//Insert mother duck cutscene here

return;
}


chase2:
if (&ducky <= 200)
{
//The duck is in the upper-right quarter of the screen
//Chase - you can make it last longer if you wish
move_stop(&current_sprite, 2, 318, 1);
move_stop(&current_sprite, 4, 130, 1);

//Have Dink catch up with the duck
sp_speed(&current_sprite, 8);
move_stop(&current_sprite, 8, 90, 1);

//Get the real Dink back and destroy the clone
int &dinkx = sp_x(&clone, -1);
int &dinky = sp_y(&clone, -1);
int &dinkdir = sp_dir(&clone, -1);
sp_x(1, &dinkx);
sp_y(1, &dinky);
sp_dir(1, &dinkdir);
sp_nodraw(1, 0);
sp_kill(&clone, 1);

//Insert mother duck cutscene here

return;
}
else
{
//The duck is in the lower-right quarter of the screen
//Chase - you can make it last longer if you wish
move_stop(&current_sprite, 4, 130, 1);

//Have Dink catch up with the duck
sp_speed(&current_sprite, 8);
move_stop(&current_sprite, 8, 90, 1);

//Get the real Dink back and destroy the clone
int &dinkx = sp_x(&clone, -1);
int &dinky = sp_y(&clone, -1);
int &dinkdir = sp_dir(&clone, -1);
sp_x(1, &dinkx);
sp_y(1, &dinky);
sp_dir(1, &dinkdir);
sp_nodraw(1, 0);
sp_kill(&clone, 1);

//Insert mother duck cutscene here

return;
}
}