Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
jdagenet

Adding two lightning sound's to a map?

Recommended Posts

In all seriousness I'm not sure. All I know is that a lot of ZDoom maps have that feature. I'm mostly a vanilla mapper.

Share this post


Link to post

Hmm alright thank's for the help I myself don't think it's possible but maybe it is and I hope it is.

Share this post


Link to post

There is a whole script type dedicated to lightning. The ZDoom Wiki has a sample script that will play sounds when the lightning is triggered. All that you have to do is set the map to use lightning with MAPINFO and make sure you got some outside areas. :)

script 1 LIGHTNING
{
	Delay(Random(20, 200));
	AmbientSound("world/thunder", 127);
}
I'm pretty sure the delay is there to simulate the time between the flash and the thunder. You'll also need to find out what sound is used for "world/thunder" in ZDOOM.WAD's SNDINFO lump, so you can appropriately name your thunder sound in your PWAD.

Oh, but you wanted two sounds randomly played. You could do that one of two ways: make the script randomly choose between two sounds or you can define "world/thunder" as a randomized sound (using the $random command) and add that to your own SNDINFO in your PWAD.

Edit: Meant SNDINFO, not ANIMDEFS. :p

Share this post


Link to post

Of course it's possible - without any ACS Voodoo.

All you need to do is to make 'world/thunder' a random sound. How to do that, best check the SNDINFO page on the ZDoom Wiki.

Share this post


Link to post

Maybe I'm misunderstanding, do you want both the lightning flash and the thunder sound, or just the sounds? If it's the latter, then yeah, no need to mess around with any ACS, as you could just make the thunder an ambient sound.

Share this post


Link to post

I am wanting the flash but let's say I have two sound's and when the flash happen's it will randomly play one of the two sound's on each flash.

Share this post


Link to post

Use the above script, but you'll need to define a randomized sound in SNDINFO. Here I simply redefine "world/thunder" to use the lumps DSTHUND1 and DSTHUND2 randomly:

world/thunder1  dsthund1
world/thunder2  dsthund2

$random world/thunder
{
  world/thunder1
  world/thunder2
}
Again, place that in your own SNDINFO, and compile the script I posted above to your map. When the lightning flashes, it will random play either DSTHUND1 or DSTHUND2.

If I got any of that wrong, please correct me.

Share this post


Link to post

I did the everything right but I didn't input the script but it work's perfectly fine maybe the script is optional? anyway thank's for the help guy's.

Share this post


Link to post

Strange, I didn't think it would automatically play the sounds. I guess that's what Graf was hinting at. :)

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×