Back to index

freedink-data  1.08.20080920
CH1-AP.c
Go to the documentation of this file.
00001 //script for chest with all magic potion
00002 
00003 void main( void)
00004 {
00005 preload_seq(175);
00006 sp_brain(&current_sprite, 0);
00007 sp_hitpoints(&current_sprite, 0);
00008 }
00009 
00010 void hit ( void )
00011  {
00012   //play noise
00013   int &hold = sp_editor_num(&current_sprite);
00014 
00015   if (&hold != 0)
00016     {
00017      //this was placed by the editor, lets make the chest stay open
00018      editor_type(&hold, 4); 
00019      editor_seq(&hold, 175);
00020      editor_frame(&hold, 4);
00021      //type means show this seq/frame combo as background in the future
00022     }
00023   &save_x = sp_x(&current_sprite, -1);
00024   &save_y = sp_y(&current_sprite, -1);
00025   &save_y += 1;
00026   external("make", "apotion");
00027 
00028   sp_seq(&current_sprite, 175);
00029  sp_script(&current_sprite, "");
00030   sp_notouch(&current_sprite, 1);
00031   sp_nohit(&current_sprite, 1);
00032  kill_this_task();
00033  }