
-----------------------------------
bahamut
Mon Jan 10, 2005 10:41 pm

Help with music file
-----------------------------------
Im new to this so... yeah ok. When i make turing play a music file it goes throught the whole file and then does other tasks. Is there a way to make it run in the background? While other tasks are bieng preformed?  :?

-----------------------------------
Delos
Mon Jan 10, 2005 11:10 pm


-----------------------------------
Hello.

2 options.

First off, there's the good ol' process approach that we all find utterly irritating except in very particular situations.


var musicFileName : string := "mymusic.wav"

process playMe
    Music.PlayFile (musicFileName)
end playMe

fork playMe

for i : 1..100
    put "The music is now playing.  Look sharp!"
    delay (10)
end for


Then, there's the nicer version, that is only available in OOT 4.0.5 (AFAIK), and goes something like this.


var musicFileName : string := "mymusic.wav"

Music.PlayFileReturn (musicFileName)

for i : 1..100
    put "Play on...flatten us with your volume!"
    delay (10)
end for


Yes, I know the 

Edit:
BTW, bahamut...resize your avtar or face the wrath of the many mods that shall be lurking quite soon...just a friendly warning...:P

-----------------------------------
bahamut
Tue Jan 11, 2005 6:42 pm

thanks
-----------------------------------
Thanks for the help i got it to work.
