Back to index

freedink-data  1.08.20080920
S1-SACK.c
Go to the documentation of this file.
00001 //sack of grain
00002 
00003 void main( void )
00004 {
00005 sp_touch_damage(&current_sprite, -1);
00006 
00007 
00008 }
00009 
00010 void hit(void)
00011 {
00012 Say("I hate you, sack of feed!", 1);
00013 }
00014 
00015 void talk(void)
00016 {
00017 Say("A big sack.", 1);
00018 }
00019 
00020 
00021 void touch(void)
00022 {
00023 //dink touched this sprite
00024 Playsound(10,22050,0,0,0);
00025 sp_brain_parm(&current_sprite, 10);
00026 sp_brain(&current_sprite, 12);
00027 sp_touch_damage(&current_sprite, 0);
00028 sp_timing(&current_sprite, 0);
00029 add_item("item-pig",438, 2);
00030 say("I now have a sack of pig feed.", 1);
00031   //kill this item so it doesn't show up again for this player
00032   int &hold = sp_editor_num(&current_sprite);
00033   if (&hold != 0)
00034   editor_type(&hold, 1); 
00035 
00036 }