Back to index

freedink-data  1.08.20080920
EN-PILLF.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, 3);
00008 sp_nohit(&current_sprite, 0);
00009 sp_exp(&current_sprite, 50);
00010 sp_base_walk(&current_sprite, 130);
00011 sp_base_death(&current_sprite, 140);
00012 sp_base_attack(&current_sprite, -1);
00013 sp_touch_damage(&current_sprite, 4);
00014 sp_hitpoints(&current_sprite, 35);
00015 preload_seq(131);
00016 preload_seq(133);
00017 preload_seq(141);
00018 preload_seq(143);
00019 
00020 if (random(2,1) == 1)
00021  {
00022  sp_target(&current_sprite, 1);
00023  }
00024 }
00025 
00026 
00027 void hit( void )
00028 {
00029 sp_target(&current_sprite, &enemy_sprite);
00030 playsound(30, 17050, 4000, &current_sprite, 0);
00031 //lock on to the guy who just hit us
00032 //playsound
00033 }
00034 void die( void )
00035 {
00036 
00037 
00038   int &hold = sp_editor_num(&current_sprite);
00039   if (&hold != 0)
00040   editor_type(&hold, 6); 
00041 
00042 &save_x = sp_x(&current_sprite, -1);
00043 &save_y = sp_y(&current_sprite, -1);
00044 
00045  external("emake","medium");
00046 
00047 }