Back to index

freedink-data  1.08.20080920
EN-PILL.c
Go to the documentation of this file.
00001 //pillbug brain
00002 
00003 void main( void )
00004 {
00005 sp_brain(&current_sprite, 9);
00006 sp_speed(&current_sprite, 1);
00007 sp_exp(&current_sprite, 5);
00008 sp_base_walk(&current_sprite, 130);
00009 sp_base_death(&current_sprite, 140);
00010 sp_touch_damage(&current_sprite, 1);
00011 sp_hitpoints(&current_sprite, 8);
00012 preload_seq(131);
00013 preload_seq(133);
00014 preload_seq(141);
00015 preload_seq(143);
00016 
00017 if (random(2,1) == 1)
00018  {
00019  sp_target(&current_sprite, 1);
00020  }
00021 }
00022 
00023 
00024 void hit( void )
00025 {
00026 sp_target(&current_sprite, &enemy_sprite);
00027 playsound(30, 21050, 4000, &current_sprite, 0);
00028 //lock on to the guy who just hit us
00029 //playsound
00030 }
00031 void die( void )
00032 {
00033   int &hold = sp_editor_num(&current_sprite);
00034   if (&hold != 0)
00035   editor_type(&hold, 6); 
00036 
00037 &save_x = sp_x(&current_sprite, -1);
00038 &save_y = sp_y(&current_sprite, -1);
00039 
00040  external("emake","small");
00041 
00042 }