jdagenet Posted July 17, 2011 Is it possible to add two lightning sound's to a map and make the two sound's randomly play? 0 Share this post Link to post
Marnetmar Posted July 17, 2011 I think it's is possible in Zdoom base'd map's . 0 Share this post Link to post
jdagenet Posted July 17, 2011 So like it could be defined in the MAPINFO lump? 0 Share this post Link to post
Marnetmar Posted July 17, 2011 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. 0 Share this post Link to post
jdagenet Posted July 17, 2011 Hmm alright thank's for the help I myself don't think it's possible but maybe it is and I hope it is. 0 Share this post Link to post
EarthQuake Posted July 17, 2011 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 0 Share this post Link to post
Graf Zahl Posted July 17, 2011 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. 0 Share this post Link to post
EarthQuake Posted July 17, 2011 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. 0 Share this post Link to post
jdagenet Posted July 17, 2011 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. 0 Share this post Link to post
EarthQuake Posted July 17, 2011 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. 0 Share this post Link to post
jdagenet Posted July 17, 2011 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. 0 Share this post Link to post
EarthQuake Posted July 17, 2011 Strange, I didn't think it would automatically play the sounds. I guess that's what Graf was hinting at. :) 0 Share this post Link to post
Graf Zahl Posted July 18, 2011 Indeed. The thunder sound is played automatically when you use the engine's lightning feature. 0 Share this post Link to post