main(void)1void main( void ) 2 { 3 sp_hitpoints(¤t_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)10void duckdie( void ) 11 { 12 13 &save_x = sp_x(¤t_sprite, -1); 14 &save_y = sp_y(¤t_sprite, -1); 15 external("make","foodduck"); 16 17 if (get_sprite_with_this_brain(3, ¤t_sprite) == 0) 18 { 19 //no more brain 3 ducks here, lets rock 20 spawn("s4-end"); 21 22 } 23 } 24