Back to index

freedink-data  1.08.20080920
PAPGOLD.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_pseq(&current_sprite, 178);
00006         sp_frame(&current_sprite, 4); //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 &gold += 200;
00015 say("I found 200 gold!",1);
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   //kill this item so it doesn't show up again for this player
00022   int &hold = sp_editor_num(&current_sprite);
00023   if (&hold != 0)
00024   editor_type(&hold, 1); 
00025 
00026 }