Back to index

freedink-data  1.08.20080920
S7-SLIMB.c
Go to the documentation of this file.
00001 //slime/puddle blue, medium
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, 0);
00009 sp_hitpoints(&current_sprite, 50);
00010 sp_exp(&current_sprite, 75);
00011 sp_base_walk(&current_sprite, 650);
00012 sp_base_death(&current_sprite, 660);
00013 sp_touch_damage(&current_sprite, 17);
00014 preload_seq(651);
00015 preload_seq(653);
00016 preload_seq(661);
00017 preload_seq(663);
00018 
00019 if (random(2,1) == 1)
00020  {
00021  sp_target(&current_sprite, 1);
00022  }
00023 
00024 
00025 }
00026 
00027 
00028 void touch( void )
00029 {
00030 //slurp noise
00031  playsound(38, 18050, 6000, 1, 0);
00032 }
00033 
00034 void hit( void )
00035 {
00036 sp_target(&current_sprite, &enemy_sprite);
00037 //lock on to the guy who just hit us
00038 //playsound
00039 sp_speed(&current_sprite, 1);
00040  playsound(38, 38050, 6000, 1, 0);
00041 
00042 }
00043 
00044 void die( void )
00045 {
00046 
00047 if (get_sprite_with_this_brain(9, &current_sprite) == 0)
00048  {
00049   //no more brain 9 monsters here, lets unlock the screen
00050 
00051   screenlock(0);
00052   playsound(43, 22050,0,0,0);
00053 
00054  }
00055 
00056 
00057 
00058   int &hold = sp_editor_num(&current_sprite);
00059   if (&hold != 0)
00060   editor_type(&hold, 6); 
00061 
00062 &save_x = sp_x(&current_sprite, -1);
00063 &save_y = sp_y(&current_sprite, -1);
00064 external("emake","medium");
00065 
00066 
00067 }