Reply to Re: Mkbul's code error thread
If you don't have an account, just leave the password field blank.
Maybe this?
Randomly play sound:
Random wait time
The randomised wait timer will surely play the sound with a defined wait minimum time, and you can add the varial as you wish ^^
Randomly play sound:
void main(void) { sp_touch_damage(¤t_sprite, -1); } void touch(void) { sp_touch_damage(¤t_sprite, 0); int &crap; sound: &crap = random(4, 1); if (&crap == 5) { playsound(35, 17000, 2000, 0, 0); } wait(100); goto sound; }The random will run 10 times per second with a chance of 1 : 5, so, probably, it will sound about 2 or 3 times per second, or not
Random wait time
void main(void) { sp_touch_damage(¤t_sprite, -1); } void touch(void) { int &crap; sp_touch_damage(¤t_sprite, 0); sound: playsound(35, 17000, 2000, 0, 0); &crap = random(300, 100); wait(&crap); goto sound; }
The randomised wait timer will surely play the sound with a defined wait minimum time, and you can add the varial as you wish ^^