Back to index

freedink-data  1.08.20080920
1GOLD.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 int &mcrap = 1;
00015 &gold += &mcrap;
00016 say("I found &mcrap gold.",1);
00017 sp_brain_parm(&current_sprite, 10);
00018 sp_brain(&current_sprite, 12);
00019 sp_touch_damage(&current_sprite, 0);
00020 sp_timing(&current_sprite, 0);
00021 
00022   //kill this item so it doesn't show up again for this player
00023   int &hold = sp_editor_num(&current_sprite);
00024   if (&hold != 0)
00025   editor_type(&hold, 1); 
00026 
00027 }