ID:150246
 
I read sariats tutorial on sounds but i found it to be a peice of shi- crap, because i put my code in, but it didnt tell me where i had to put my sound file, or if i had to import it or something. Can somebody tell me what I have to do?
well, this code will play a sound for you, any sound, just pick one!

mob/verb/playsound(S as sound)
usr << sound(S,1)

you can define is by either
S = 'sounds.wav'
or
usr << sound('sounds.wav',1)
In response to Foomer
so it doesn't matter whee it is on my computer, as long as it exists?
Normally, files that your game will use should be in the same directory as all the other stuff.. if it doesn't show up in the project in DM, it doesn't know what file you're pointing it at..

-- Tarmas.
the sound file has to be in the same folder as the world source file (ie. yourworld.dme)

An example:\

sound file path:
C:\Program Files\Byond\Bin\YourGame\YourSound.wav

code:
mob
Login()
src << sound('YourSound.wav',0)


Dream Maker always refers to files in the Base direction(C:\Program Files\Byond\Bin\YourGame)

unless you use files in other folders or something.

FIREking
In response to Tarmas
ok, thanks, but in the library it didnt show any sound files so i was copnfused
In response to JordanUl
no, it does matter, read my post.
In response to FIREking
yea i did, i was replying to f00mer before u guys posted, and thanks for your help guys
In response to FIREking
one more question guys, can it run Midi's?
In response to JordanUl
sure can, and on top of that, it can play mulitple wav files at the same time, up to 8 i think!
In response to FIREking
thx fire