Back to index

freedink-data  1.08.20080920
HEART.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, 52);
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 &life = &lifemax;
00016 Playsound(10,22050,0,0,0);
00017 //shrink to this percent then die
00018 sp_brain_parm(&current_sprite, 5);
00019 sp_brain(&current_sprite, 12);
00020 sp_touch_damage(&current_sprite, 0);
00021 sp_timing(&current_sprite, 0);
00022 
00023   int &hold = sp_editor_num(&current_sprite);
00024   if (&hold != 0)
00025     {
00026      //this was placed by the editor, lets make it not come back
00027      editor_type(&hold, 1); 
00028      //kill food forever
00029     }
00030 
00031 
00032 
00033 }