Back to index

freedink-data  1.08.20080920
EN-PILL1.c
Go to the documentation of this file.
00001 //pillbug brain
00002 
00003 void main( void )
00004 {
00005 screenlock(1);
00006 sp_brain(&current_sprite, 9);
00007 sp_speed(&current_sprite, 2);
00008 sp_nohit(&current_sprite, 0);
00009 sp_exp(&current_sprite, 10);
00010 sp_base_walk(&current_sprite, 130);
00011 sp_base_death(&current_sprite, 140);
00012 sp_touch_damage(&current_sprite, 3);
00013 sp_hitpoints(&current_sprite, 15);
00014 preload_seq(131);
00015 preload_seq(133);
00016 preload_seq(141);
00017 preload_seq(143);
00018 
00019 if (random(2,1) == 1)
00020  {
00021  sp_target(&current_sprite, 1);
00022  }
00023 }
00024 
00025 
00026 void hit( void )
00027 {
00028 sp_target(&current_sprite, &enemy_sprite);
00029 playsound(30, 17050, 4000, &current_sprite, 0);
00030 //lock on to the guy who just hit us
00031 //playsound
00032 }
00033 void die( void )
00034 {
00035 
00036 if (get_sprite_with_this_brain(9, &current_sprite) == 0)
00037  {
00038   //no more brain 9 monsters here, lets unlock the screen
00039 
00040   screenlock(0);
00041   playsound(43, 22050,0,0,0);
00042 
00043  }
00044 
00045   int &hold = sp_editor_num(&current_sprite);
00046   if (&hold != 0)
00047   editor_type(&hold, 6); 
00048 
00049 &save_x = sp_x(&current_sprite, -1);
00050 &save_y = sp_y(&current_sprite, -1);
00051 
00052  external("emake","small");
00053 
00054 }