Author
|
Topic: How do you loop waves?!?
|
FF4LIFE |
posted 07-17- 11:10 PM CT (US)
I read the DinkC text file about looping wavs and making them survive and the killing them and, quite frankly, i don't get it. I tell it to play a sound, and it always carries on to the next screen but doesn't loop and the kill command won't kill it. That is if i did the kill all sound command correctly. I use the playsound("blah.wav", 2250, 0 ,0 ,0); or whatever command. I don't know how to make it loop, it survives already, i think, and i can't kill it to start a new sound when i walk on a certain screen. Any help would be GREATLY appreciated. Thanks 8-)
|
Sphinx
|
posted 07-21- 01:04 AM CT (US)
Poor guy... and the answer is so simple you're going to hate me. playsound("blah.wav", 22050, 0 ,0 ,0); will play the sound once, and allows for screen changes. But changing the last number so it looks like playsound("blah.wav", 22050, 0 ,0 ,1); makes it play forever and makes the sound "global" and thus your kill_all_sounds command will work to stop it. |
FF4LIFE
|
posted 07-21- 06:03 AM CT (US)
Thanks, I'll try that. PS I HATE YOU!! |
FF4LIFE
|
posted 07-21- 06:35 AM CT (US)
Hmmm... That sort of works. When I put that 1 at the end it made it stop when I went screen to screen, but it does loop. I have the fealing I have to do something with that set servive stuff, but I don't get it either.Sorry I have to be a pain and ask all these dumb questions =) |
Sphinx
|
posted 07-23- 11:01 PM CT (US)
Ummm.... well, I guess it depends which script you've got playing the sound... if it's a script connected to a monster, the sound will stop when it dies or if you leave the screen. If it's attached to a page script then you will have to make the page script survive screen transitions with script_attach(1000); ...that's about the best I can come up with. (it'd probably just be easier to use midi's...) Oh, by the way, if you change the extension of the file from .wav to .mid , dink will play the file the same except treating it like a midi! |
FF4LIFE
|
posted 08-12- 09:41 PM CT (US)
Wow, thats cool that i can change that. I like my meathod of using waves better because if it stops in a map with a midi, it won't start until you go off the map again. I'll try the midi thing, but the reason i had to use the wavs in the first place is because they sound a LOT better as waves.So, if i'm going to use the wavs, please explain more about the set survive thing, and yes, i have the playsound command on the screen script. Sorry for the lack of response i've been gone camping for 3 weeks. |
FF4LIFE
|
posted 08-16- 11:00 PM CT (US)
Ok, that changing the extention thing didn't work (As i figured) I changed the last number in the playsound command and it loops. Apparently it also makes it global. I know I need to use the survive command, but I don't know how and can't get it to work. If one of you that knows how will just take a minute from his life to tell me, it would be greatly appreciated. |