Back to index

freedink-data  1.08.20080920
BAR-DP.c
Go to the documentation of this file.
00001 //script for barrel with defense potion
00002 
00003 void main( void)
00004 {
00005 preload_seq(173);
00006 preload_seq(55);
00007 
00008 }
00009 
00010 void hit ( void )
00011  {
00012   playsound(37, 22050, 0,0,0);
00013   //play noise
00014   int &hold = sp_editor_num(&current_sprite);
00015 
00016   if (&hold != 0)
00017     {
00018      //this was placed by the editor, lets make the barrel stay flat
00019      editor_type(&hold, 3); 
00020      editor_seq(&hold, 173);
00021      editor_frame(&hold, 6);
00022      //type means show this seq/frame combo as background in the future
00023     }
00024   sp_seq(&current_sprite, 173);
00025   sp_brain(&current_sprite, 5);
00026   sp_notouch(&current_sprite, 1);
00027   sp_nohit(&current_sprite, 1);
00028   &save_x = sp_x(&current_sprite, -1);
00029   &save_y = sp_y(&current_sprite, -1);
00030   external("make", "dpotion");
00031   sp_hard(&current_sprite, 1);
00032   //sprite ain't hard no more!
00033   draw_hard_sprite(&current_sprite);
00034   kill_this_task();
00035  }