Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / How to randomize sound?

Author
Message
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 14th Feb 2003 22:50
i'm making a game with some explosions in it.
but i don't want the same explosion over and over again.
so i made a little code but it doesn't work properly.



when i hit object 3 for the fourth time it say's:
runtime error 3001 - sound number illegal at line x

i think it's becouse the rnd(value) command uses value's between 0 and (value) and i don't have a sound with the value 0.
So how can i fix this problem?
Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 10GB HD, Riva TNT2 Ultra 32mb
AnalSauceMonkey
21
Years of Service
User Offline
Joined: 24th Oct 2002
Location: I can't find myself
Posted: 14th Feb 2003 23:05
rnd(3)+1

Ha!
Sly D
21
Years of Service
User Offline
Joined: 15th Oct 2002
Location:
Posted: 14th Feb 2003 23:25
Also at the begginig you should put RANDOMIZE TIMER() so that you dont get the sam value again and again

Login to post a reply

Server time is: 2024-09-19 17:55:08
Your offset time is: 2024-09-19 17:55:08