Back to index

freedink-data  1.08.20080920
SC-PILL.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_timing(&current_sprite, 10);
00009 sp_exp(&current_sprite, 100);
00010 sp_base_walk(&current_sprite, 130);
00011 sp_base_death(&current_sprite, 140);
00012 sp_touch_damage(&current_sprite, 25);
00013 sp_hitpoints(&current_sprite, 50);
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, 15050, 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 
00046 
00047 
00048   int &hold = sp_editor_num(&current_sprite);
00049   if (&hold != 0)
00050   editor_type(&hold, 6); 
00051 
00052 &save_x = sp_x(&current_sprite, -1);
00053 &save_y = sp_y(&current_sprite, -1);
00054 
00055  external("emake","large");
00056 
00057 }