Reply to Re: Why does the grunt wav sound super-low?
If you don't have an account, just leave the password field blank.
January 5th 2013, 05:24 AM
shevek
pillbugs don't do any damage to the player at all.
That is correct. Pillbugs hurt Dink through touch damage. If you set that to -1, they will no longer hurt him. However, because your script is run, you can make them hurt Dink in there:
This first makes sure touch() is only called once, then hurts Dink, then sets the sprite's animation to its way to die, which is then run and left at the background with brain 5. If you don't want a death animation, you can simply use sp_active(¤t_sprite, 0); instead.
Note that with the above script, they will always do exactly 5-defense damage, which isn't equivalent of touch damage 5. If you want that, you should compute random (5/2, 5/2) (a random value from the upper half of the touch damage) and use the result.
That is correct. Pillbugs hurt Dink through touch damage. If you set that to -1, they will no longer hurt him. However, because your script is run, you can make them hurt Dink in there:
void touch() { sp_touch_damage(¤t_sprite, 0); hurt(1, 5); sp_seq(¤t_sprite, <insert dying sequence here ; sp_frame(¤t_sprite, 1); sp_brain(¤t_sprite, 5); }
This first makes sure touch() is only called once, then hurts Dink, then sets the sprite's animation to its way to die, which is then run and left at the background with brain 5. If you don't want a death animation, you can simply use sp_active(¤t_sprite, 0); instead.
Note that with the above script, they will always do exactly 5-defense damage, which isn't equivalent of touch damage 5. If you want that, you should compute random (5/2, 5/2) (a random value from the upper half of the touch damage) and use the result.