Debian Codegraph @

soundtest/story/sheart.c

raw
1 //this script fills life up, touch_damage must be set to -1. (run script mode)
2
3 void main( )
4 {
5 sp_seq(&current_sprite, 54);
6 sp_frame(&current_sprite, 1); //so the seq will start
7 sp_brain(&current_sprite, 6);
8 sp_touch_damage(&current_sprite, -1);
9 sp_nohit(&current_sprite, 1);
10 }
11
12 void touch( void )
13 {
14 &life += 3;
15 if (&life > &lifemax)
16 {
17 &life = &lifemax;
18 }
19 Playsound(10,22050,0,0,0);
20 sp_brain_parm(&current_sprite, 10);
21 sp_brain(&current_sprite, 12);
22 sp_touch_damage(&current_sprite, 0);
23 sp_timing(&current_sprite, 0);
24
25 say_xy("sword2.wav/22050Hz - heart pick-up", 0, 380);
26 }