Back to index

freedink-data  1.08.20080920
SHEART.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, 54);
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 void touch( void )
00013 {
00014 &life += 3;
00015 if (&life > &lifemax)
00016  {
00017  &life = &lifemax;
00018  }
00019 Playsound(10,22050,0,0,0);
00020 sp_brain_parm(&current_sprite, 10);
00021 sp_brain(&current_sprite, 12);
00022 sp_touch_damage(&current_sprite, 0);
00023 sp_timing(&current_sprite, 0);
00024 
00025   //kill this item so it doesn't show up again for this player
00026   int &hold = sp_editor_num(&current_sprite);
00027   if (&hold != 0)
00028   editor_type(&hold, 1); 
00029 
00030 
00031 }