Back to index

freedink-data  1.08.20080920
S4-DUCK.c
Go to the documentation of this file.
00001 void main( void )
00002 {
00003 sp_hitpoints(&current_sprite, 5);
00004 
00005 }
00006 //this is a special kill script just ducks, so you can run something
00007 //when their headless body is killed also (die is run as soon as they are
00008 //killed, which is too early for what we want to do)
00009 
00010 void duckdie( void )
00011 {
00012 
00013 &save_x = sp_x(&current_sprite, -1);
00014 &save_y = sp_y(&current_sprite, -1);
00015 external("make","foodduck");
00016 
00017 if (get_sprite_with_this_brain(3, &current_sprite) == 0)
00018  {
00019   //no more brain 3 ducks here, lets rock
00020 spawn("s4-end");
00021 
00022  }
00023 }