Back to index

freedink-data  1.08.20080920
EN-SLIMB.c
Go to the documentation of this file.
00001 //slime/puddle blue, medium
00002 
00003 void main( void )
00004 {
00005 sp_brain(&current_sprite, 9);
00006 sp_speed(&current_sprite, 1);
00007 sp_timing(&current_sprite, 10);
00008 sp_hitpoints(&current_sprite, 25);
00009 sp_exp(&current_sprite, 14);
00010 sp_base_walk(&current_sprite, 650);
00011 sp_base_death(&current_sprite, 660);
00012 sp_touch_damage(&current_sprite, 3);
00013 preload_seq(651);
00014 preload_seq(653);
00015 preload_seq(661);
00016 preload_seq(663);
00017 
00018 if (random(2,1) == 1)
00019  {
00020  sp_target(&current_sprite, 1);
00021  }
00022 
00023 
00024 }
00025 
00026 
00027 void touch( void )
00028 {
00029 //slurp noise
00030  playsound(38, 18050, 6000, 1, 0);
00031 }
00032 
00033 void hit( void )
00034 {
00035 sp_target(&current_sprite, &enemy_sprite);
00036 //lock on to the guy who just hit us
00037 //playsound
00038 sp_speed(&current_sprite, 1);
00039  playsound(38, 38050, 6000, 1, 0);
00040 
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 
00049 &save_x = sp_x(&current_sprite, -1);
00050 &save_y = sp_y(&current_sprite, -1);
00051 external("emake","small");
00052 
00053 
00054 }