
-----------------------------------
Gackt
Thu Dec 20, 2007 5:15 pm

Music.Playfile Trouble While Running The Program.
-----------------------------------
Ok, I'm having trouble playing My Music.Playfile while executing the program, ike the music plays but Nothing else will work, Is this because I only put in the Music.Playfile or something else? I;m not really sure how to fix this, it kinda stumped me, I looked at the tutorial that Dan posted but i Didnt really understand it. Thanks for your help.

-----------------------------------
Clayton
Thu Dec 20, 2007 5:18 pm

RE:Music.Playfile Trouble While Running The Program.
-----------------------------------
It's working exactly as you coded it to. When you run Music.PlayFile(), the program will wait for the music to finish before continuing on. Look into Music.PlayFileReturn() instead.

-----------------------------------
HeavenAgain
Thu Dec 20, 2007 5:19 pm

RE:Music.Playfile Trouble While Running The Program.
-----------------------------------
what alot of people do is process for background music, something likeprocess bgmusic
loop
MusicPlayfile
end loop
end bgmusic
fork bgmusic
somewhat like that so it continues playing
so just fork it :roll:

-----------------------------------
Gackt
Thu Dec 20, 2007 5:47 pm

RE:Music.Playfile Trouble While Running The Program.
-----------------------------------
Eh, Your Right, Thanks for your help, I got it working now.

-----------------------------------
questionableninja
Thu Jan 03, 2008 7:09 pm

Re: RE:Music.Playfile Trouble While Running The Program.
-----------------------------------
what alot of people do is process for background music, something likeprocess bgmusic
loop
MusicPlayfile
end loop
end bgmusic
fork bgmusic
somewhat like that so it continues playing
so just fork it :roll:

yea i know this isn't my question but when i try to fork som music it works fine but i can't end the program even when the game is done  :shock:

-----------------------------------
HeavenAgain
Thu Jan 03, 2008 7:28 pm

RE:Music.Playfile Trouble While Running The Program.
-----------------------------------
simple, just add a boolean to keep track whenever you want to exit the music, say you have a boolean variable called flag and its false, now in your process bgmusic you just add "exit when flag", and make the flag true whenever you want to stop it :)

-----------------------------------
questionableninja
Sat Jan 05, 2008 1:36 am

Re: Music.Playfile Trouble While Running The Program.
-----------------------------------
thx man

-----------------------------------
ericfourfour
Sat Jan 05, 2008 9:03 pm

Re: Music.Playfile Trouble While Running The Program.
-----------------------------------
For the sake of simplicity.

Play music: Music.PlayFileReturn("music_file_name")

Stop music: Music.PlayFileStop

From the Turing Documentation under the Music module.
