Back to index

freedink-data  1.08.20080920
DAM-FIRE.c
Go to the documentation of this file.
00001 //script for individual fireball
00002 void main( void )
00003 {
00004         int &mcrap;
00005         int &scrap;
00006        int &junk;
00007 }
00008 
00009 void damage( void )
00010 {
00011         playsound(18, 8000,0,0,0);
00012 
00013         &scrap = &current_sprite;
00014         kill_shadow(&scrap);
00015         sp_seq(&scrap, 70);
00016         sp_pseq(&scrap, 70);
00017         sp_frame(&scrap, 1);
00018         sp_brain(&scrap, 7);
00019         &mcrap = sp_y(&scrap, -1);
00020         &mcrap -= 35;
00021         sp_y(&scrap, &mcrap);
00022 
00023  &mcrap = sp_pseq(&missile_target, -1);
00024  &scrap = sp_pframe(&missile_target, -1);
00025   int &hold = sp_editor_num(&missile_target);
00026 
00027   if (&mcrap == 32)
00028   {
00029    if (&scrap == 1)
00030    {
00031    //they hit a tree, lets burn the thing
00032     sp_hard(&missile_target, 1);
00033     draw_hard_sprite(&missile_target);
00034 
00035   &junk = is_script_attached(&missile_target);
00036   if (&junk > 0)
00037   {
00038  //Script is attached to this tree!  Let's run it's die script
00039   run_script_by_number(&junk, "DIE");
00040    return;
00041   }
00042 
00043   if (&hold != 0)
00044     {
00045      //this was placed by the editor, lets make the tree stay burned
00046      editor_type(&hold, 4); 
00047      editor_seq(&hold, 20);
00048      editor_frame(&hold, 29);
00049      //type means show this seq/frame combo as background in the future
00050     }
00051   
00052     sp_pseq(&missile_target, 20);
00053     sp_pframe(&missile_target, 29);
00054     sp_hard(&missile_target, 0);
00055     draw_hard_sprite(&missile_target);
00056     sp_seq(&missile_target, 20);
00057     playsound(6, 8000,0,&missile_target,0);
00058     
00059    }
00060   }
00061 
00062 }