Back to index

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