| 1 |
//this script fills life up, touch_damage must be set to -1. (run script mode) |
| 2 |
|
| 3 |
void main( ) |
| 4 |
{ |
| 5 |
sp_seq(¤t_sprite, 54); |
| 6 |
sp_frame(¤t_sprite, 1); //so the seq will start |
| 7 |
sp_brain(¤t_sprite, 6); |
| 8 |
sp_touch_damage(¤t_sprite, -1); |
| 9 |
sp_nohit(¤t_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(¤t_sprite, 10); |
| 21 |
sp_brain(¤t_sprite, 12); |
| 22 |
sp_touch_damage(¤t_sprite, 0); |
| 23 |
sp_timing(¤t_sprite, 0); |
| 24 |
|
| 25 |
say_xy("sword2.wav/22050Hz - heart pick-up", 0, 380); |
| 26 |
} |