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 / can I make sound run randomly?

Author
Message
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 19th Mar 2006 13:22
I've built a sort of dungeon. It is possible that I can make the occasional scream or clanking of chains that I've loaded, just happen as my hero is wandering around?
thanks

If it doesn't work the first time, then there's always television.
x1b
20
Years of Service
User Offline
Joined: 19th Sep 2004
Location:
Posted: 19th Mar 2006 14:24 Edited at: 20th Mar 2006 01:15
Yes, you can. In example, in my WIP, I have random thunder claps. I wrote the following code to do so



Sounds 6 & 7 are two different thunder claps at random. So, you could load 1 scream, 1 chain clank and more if need be and add more if desired by doing something like


where sound 1,2 & 3 are 3 different sounds and so on


Know what? while we're at it,lets give your player a foot fall sound. That is, lets hear your player walking the dungeon. For this,in my wip,I use the code



What this does,is loop a footfall sound as long as one of the arrow keys(used to move my character) is being pressed.

Give it a try.


Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 19th Mar 2006 21:05
That was exactly what I wanted; thanks.

If it doesn't work the first time, then there's always television.
x1b
20
Years of Service
User Offline
Joined: 19th Sep 2004
Location:
Posted: 20th Mar 2006 00:54
For sure,glad to help.


Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 21st Mar 2006 15:27
x1b is that possible in DBP?

Visit our site : www.freewebs.com/tpfpsc

Login to post a reply

Server time is: 2024-11-27 01:58:27
Your offset time is: 2024-11-27 01:58:27