Dieing Ducks and Pigs
Please help me with a script that allows ducks and pigs to die.
I would like for them to say something on the first hit - if possible.
Thank you for your scripting.
David
I would like for them to say something on the first hit - if possible.
Thank you for your scripting.
David
Attach this script to a duck:
//Duck script
void main( void )
{
sp_brain(¤t_sprite, 3);
sp_base_walk(¤t_sprite, 20);
sp_speed(¤t_sprite, 1);
sp_timing(¤t_sprite, 33);
sp_hitpoints(¤t_sprite, 1);
preload_seq(21);
preload_seq(23);
preload_seq(24);
preload_seq(26);
preload_seq(27);
preload_seq(29);
preload_seq(111);
preload_seq(113);
preload_seq(117);
preload_seq(119);
preload_seq(121);
preload_seq(121);
preload_seq(121);
preload_seq(121);
}
void die( void )
{
say("`%Quack!", ¤t_sprite);
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 6);
}
Replace the "`%Quack!" with whatever you want.
//Duck script
void main( void )
{
sp_brain(¤t_sprite, 3);
sp_base_walk(¤t_sprite, 20);
sp_speed(¤t_sprite, 1);
sp_timing(¤t_sprite, 33);
sp_hitpoints(¤t_sprite, 1);
preload_seq(21);
preload_seq(23);
preload_seq(24);
preload_seq(26);
preload_seq(27);
preload_seq(29);
preload_seq(111);
preload_seq(113);
preload_seq(117);
preload_seq(119);
preload_seq(121);
preload_seq(121);
preload_seq(121);
preload_seq(121);
}
void die( void )
{
say("`%Quack!", ¤t_sprite);
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 6);
}
Replace the "`%Quack!" with whatever you want.
so the duck'll come back after 6 minutes. I'd put there 1 though, I hate respawning.
July 27th 2004, 09:42 AM

Milo Bones


But they never came back... I guess they would if you left 'em running around bloody. I'm too lazy to test.
So I don't need 6 for ducks?
What is the script for pigs?????
Mind, I can get a moving duck and a moving pig, but nothing happens to them when I hit them.
What is the script for pigs?????
Mind, I can get a moving duck and a moving pig, but nothing happens to them when I hit them.
July 27th 2004, 04:38 PM

Milo Bones


Stalker's script should work... I'm baffled if it doesn't.
It should, at least it has worked with all my D-Mods.
BTW, Easy DinkC says that the proc duckdie(); is run when the duck's head is cut off. Does it call both duckdie(); and die(); at the same time?
BTW, Easy DinkC says that the proc duckdie(); is run when the duck's head is cut off. Does it call both duckdie(); and die(); at the same time?
duckdie(); is the procedure run when you completely demolish the duck.
Great ducks wrok, What is the script for Pigs?
I assume pigs changing into ducks means something is wrong?
I assume pigs changing into ducks means something is wrong?

//Piggie
void main( void )
{
sp_brain(¤t_sprite, 4);
sp_base_walk(¤t_sprite, 40);
sp_speed(¤t_sprite, 1);
sp_timing(¤t_sprite, 66);
sp_hitpoints(¤t_sprite, 5);
}
void die( void )
{
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 1);
}
void main( void )
{
sp_brain(¤t_sprite, 4);
sp_base_walk(¤t_sprite, 40);
sp_speed(¤t_sprite, 1);
sp_timing(¤t_sprite, 66);
sp_hitpoints(¤t_sprite, 5);
}
void die( void )
{
int &hold = sp_editor_num(¤t_sprite);
if (&hold != 0)
editor_type(&hold, 1);
}