ZDoom

Ambient Sound Sequence?

Ambient Sound Sequence?

Posted: Sun Dec 30, 2018 9:43 am

by RastaManGames

I have 45 sounds and i need to do tricky thing:In interval from 1 to 2 mins 1 of 45 sounds must be played in specific spots of my map with specific radius.How can i do that? For this moment, i just put 45 ambient sound things in one spot, but (of course) sometimes more than 1 ambient sounds are played... So... This method are dull and ambient sounds are mixed into hellish cacophony.I need to learn about sound sequences or i can (somehow) do that trick just using ACS?Or there is any good method to do that without hard scripting? Because map is really big and i do not want to load in-game processor too much.Also sorry for my really awful English...

Re: Ambient Sound Sequence?

Posted: Sun Dec 30, 2018 9:56 am

by Enjay

Do you need the sounds to be played in a specific sequence, or do you just need one of the sound to be picked at random? If it's the second option, you can define a random sound in SNDINFO, allocate all 45 sounds to the random sound and then allocate the random sound to an ambient sound thing with suitable parameters.

e.g. from the SNDINFO in my Heretic Thief mod:

I called a sound "ambience" (probably should have gone for a better name) allocated sounds called amb01-amb29 to it (these corresponded to sound lumps with the same names - again, not best practice) and then I defined ambient sound 12 to play the sound "ambience" at a random interval (from 10 to 30 seconds) in surround sound. So, all I had to place in the map was a single sound item for sound number 12.

Re: Ambient Sound Sequence?

I think this can better be done with ACS's sound playing functions. There you have total control over which sound will be played where.The automated playing thing are not really the best solution here

Re: Ambient Sound Sequence?

Posted: Sun Dec 30, 2018 2:25 pm

by RastaManGames

First i try Enjay's method... By the way, ACS method include timer with ticks and some cycles?I know programming little bit, but i don't understand the basic core of this method...

UPD: Thank you very much, dudes! Enjay's method are working fine! I remember also nameless mod (idk who author of that creation), where in every level playing some dark ambient music and after few seconds some various random scary sounds (like metal screeching, wood breaking, stone moving and etc.) are playing near player (i think it's surround).