Back to index

freedink-data  1.08.20080920
EN-SLIM.c
Go to the documentation of this file.
00001 //slime brain
00002 
00003 void main( void )
00004 {
00005 sp_brain(&current_sprite, 9);
00006 sp_speed(&current_sprite, 1);
00007 sp_exp(&current_sprite, 8);
00008 sp_timing(&current_sprite, 20);
00009 sp_hitpoints(&current_sprite, 15);
00010 sp_touch_damage(&current_sprite, 6);
00011 preload_seq(651);
00012 preload_seq(653);
00013 preload_seq(661);
00014 preload_seq(663);
00015 sp_base_attack(&current_sprite, -1);
00016 sp_base_walk(&current_sprite,690);
00017 sp_base_death(&current_sprite, 700);
00018                               
00019 if (random(2,1) == 1)
00020  {
00021  sp_target(&current_sprite, 1);
00022  }
00023 }
00024 
00025 
00026 void touch( void )
00027 {
00028 //slurp noise
00029 
00030  playsound(38, 18050, 6000, 0, 0);
00031 
00032 }
00033 
00034 
00035 void hit( void )
00036 {
00037 sp_target(&current_sprite, &enemy_sprite);
00038 //lock on to the guy who just hit us
00039 //playsound
00040  playsound(38, 38050, 6000, 1, 0);
00041 
00042 }
00043 void die( void )
00044 {
00045   int &hold = sp_editor_num(&current_sprite);
00046   if (&hold != 0)
00047   editor_type(&hold, 6); 
00048 &save_x = sp_x(&current_sprite, -1);
00049 &save_y = sp_y(&current_sprite, -1);
00050  external("emake","small");
00051 
00052 }