Back to index

freedink-data  1.08.20080920
DAM-A1.c
Go to the documentation of this file.
00001 //script for individual arrow
00002 void main( void )
00003 {
00004         int &mcrap;
00005         int &scrap;
00006 
00007 }
00008 
00009 void damage( void )
00010 {
00011     int &hold = sp_editor_num(&missile_target);
00012 
00013 if (&missile_target == 0)
00014   {
00015      sp_speed(&current_sprite, 0);
00016      sp_brain(&current_sprite, 0);
00017     sp_nohit(&current_sprite, 1);
00018     playsound(41, 22050,0,0,0);
00019 //    sp_script(&current_sprite, "");
00020     kill_this_task();
00021   }
00022 
00023   if (&hold != 0)
00024     {
00025       &scrap = sp_brain(&missile_target, -1);
00026       if (&scrap != 0)
00027       {
00028    //looks like we should not make the arrow stick
00029     kill_shadow(&current_sprite);
00030     sp_active(&current_sprite, 0);
00031     playsound(41, 22050,0,0,0);
00032      return;
00033       }
00034      sp_speed(&current_sprite, 0);
00035      sp_brain(&current_sprite, 0);
00036     playsound(41, 22050,0,0,0);
00037   //  sp_script(&current_sprite, "");
00038     return;
00039     }
00040     kill_shadow(&current_sprite);
00041    sp_active(&current_sprite, 0);
00042     playsound(41, 22050,0,0,0);
00043   //  sp_script(&current_sprite, "");
00044 
00045     kill_this_task();
00046 
00047    
00048 
00049 }
00050 
00051    void hit( void )
00052    {
00053    playsound(37, 28050, 0,0,0);
00054    sp_active(&current_sprite, 0);
00055     sp_nohit(&current_sprite, 1);
00056    }
00057