main(void)1 void main( void )
2 {
3 sp_hitpoints(&current_sprite, 5);
4 
5 }
6 //this is a special kill script just ducks, so you can run something
7 //when their headless body is killed also (die is run as soon as they are
8 //killed, which is too early for what we want to do)
9 
duckdie(void)10 void duckdie( void )
11 {
12 
13 &save_x = sp_x(&current_sprite, -1);
14 &save_y = sp_y(&current_sprite, -1);
15 external("make","foodduck");
16 
17 if (get_sprite_with_this_brain(3, &current_sprite) == 0)
18  {
19   //no more brain 3 ducks here, lets rock
20 spawn("s4-end");
21 
22  }
23 }
24