Back to index

freedink-data  1.08.20080920
GHEART.c
Go to the documentation of this file.
00001 //this script fills life up, touch_damage must be set to -1. (run script mode)
00002 
00003 void main( )
00004 {
00005         sp_seq(&current_sprite, 53);
00006         sp_frame(&current_sprite, 1); //so the seq will start
00007         sp_brain(&current_sprite, 6);
00008         sp_touch_damage(&current_sprite, -1);
00009         sp_nohit(&current_sprite, 1);
00010 
00011 }
00012 
00013 void touch( void )
00014 {
00015 &lifemax += 10;
00016 Playsound(10,22050,0,0,0);
00017 Playsound(22,22050,0,0,0);
00018 //grow to this percent then die
00019 sp_brain_parm(&current_sprite, 500);
00020 sp_brain(&current_sprite, 12);
00021 sp_touch_damage(&current_sprite, 0);
00022 sp_timing(&current_sprite, 0);
00023 
00024   int &hold = sp_editor_num(&current_sprite);
00025   if (&hold != 0)
00026     {
00027      //this was placed by the editor, lets make it not come back
00028      editor_type(&hold, 1); 
00029      //kill food forever
00030     }
00031 
00032 
00033 
00034 }
00035