Back to index

freedink-data  1.08.20080920
S5-SEC1.c
Go to the documentation of this file.
00001 //secret 1 for area 5
00002 
00003 void hit( void )
00004 {
00005         int &rcrap = compare_sprite_script(&missle_source, "dam-bomn");
00006         if (&rcrap == 1)
00007   {
00008   //rock just got hit by a sprite with a script named dam-bomn, I'm gonna
00009   //guess it was the bomb.
00010   &save_x = sp_x(&current_sprite, -1);
00011   &save_y = sp_y(&current_sprite, -1);
00012   &save_y += 1;
00013   external("make", "gheart");
00014 
00015   //remove rocks hardness and sprite
00016   sp_hard(&current_sprite, 1);
00017   draw_hard_sprite(&current_sprite);
00018   sp_active(&current_sprite, 0);
00019   playsound(43, 22050, 0,0,0);
00020 
00021 
00022 
00023   //kill this item so it doesn't show up again for this player
00024   int &hold = sp_editor_num(&current_sprite);
00025   if (&hold != 0)
00026   editor_type(&hold, 1); 
00027 
00028 
00029   }
00030 
00031 }