PDA

View Full Version : weather and sound



12-07-2003, 10:18 PM
Hello and sorry to bother...
I am playing at making a Dmod. I have set up to be sent to a bad place in the game by a mad merlin person. How do i get the sound of wind to come active as soon as Dink enters this area..IE... Dink is sent to the cold region, as soon as he pops into the snowy screen i want the sound of wind( i have a wind.c) and i need to to be windy on many screens until Dink finds his way out..
i hope this makes sense..
Thank you
Mdevine( SteCatv)

redink1
12-09-2003, 05:09 AM
First, make a global variable called "windsound" or something similar in main.c.

Second, place your wind sound file in the 'sound' directory of your D-Mod, and add your sound to the list in start.c, and give it the next available number. For example, let's place it in slot 99.

Then whenever you want to start the wind sound, try this:

//Change 11025 to 16000 or 22050, whichever sounds best
&windsound = playsound(99,11025,0,0,1);
sound_set_survive(&windsound);

And then when you want to stop it from playing, do this:

sound_set_kill(&windsound);

12-11-2003, 10:03 PM
Thank you so much..it is most appreciated...i was not sure if anyone still looked into this forum :}

12-12-2003, 01:28 AM
Excuse my stupidity but what do you mean by a " Global Variable" to be added into Start.c?
thank you.
Mdevine

sfxguru
08-11-2007, 09:36 PM
There are some cool weather sound effects (http://www.sound-effect.com/browse.php?categoryId=100&parentCat=90) to download on sound-effect.com.

-Mark