Back to index

freedink-data  1.08.20080920
BPOTION.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_touch_damage(&current_sprite, -1);
00006 sp_seq(&current_sprite, 55);
00007 sp_brain(&current_sprite, 6);
00008 
00009 }
00010 
00011 void touch( void )
00012 {
00013 &defense += 1;
00014 Playsound(10,22050,0,0,0);
00015 //shrink to this percent then die
00016 sp_brain_parm(&current_sprite, 10);
00017 sp_brain(&current_sprite, 12);
00018 sp_touch_damage(&current_sprite, 0);
00019 sp_timing(&current_sprite, 0);
00020 
00021   int &hold = sp_editor_num(&current_sprite);
00022   if (&hold != 0)
00023     {
00024      //this was placed by the editor, lets make it not come back
00025      editor_type(&hold, 1); 
00026      //kill food forever
00027     }
00028 
00029 }
00030