Lightning Storm

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
Caleb_

Lightning Storm

Post by Caleb_ »

Is there a way to make a lightning storm with a lightning sound like in Hexen map 01?
User avatar
Biff
Posts: 1061
Joined: Wed Jul 16, 2003 5:29 pm
Location: Monrovia, CA, USA

Post by Biff »

Yes, brother. :)

Looking at hexen.wad, I'm not sure there is a thunder sound in map01, at least I don't see what plays it. The only obvious ambient sound is an owl, played somewhat at random by this script:

script 253 OPEN
{
delay(random(3, 7)*100);
thingsound(36, "Ambient6", 100);
restart;
}


The lightning is a callout in the mapinfo lump (text file in the wad) which has these entries for map01:

map 1 "WINNOWING HALL"
warptrans 1
next 2
cluster 1
sky1 SKY2 0
sky2 SKY3 0
lightning <---------
cdtrack 13


Zdoom will allow you to place this entry in a mapinfo lump for doom, doom2, heretic and hexen games. I'm not clear on getting thunder to sound in sequence with this lightning. ??
User avatar
Enjay
 
 
Posts: 27144
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

If you pop along to my examples site ( http://members.lycos.co.uk/Enjay001/ ) there are 2 Zdoom sky examples about half way down the page. Redsky is the one you want. Not only does it use a MAPINFO to get lightning on the level, it has the thunder sound defined and in addition uses a cool feature where the sky changes momentarily to show a lightning bolt every time the lightning flashes. All done without scripting.

You may be interested to know, there is also a script type (use lightning instead of open, (void), enter, etc) which will execute the script every time lightning flashes on the level.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

Enjay wrote:You may be interested to know, there is also a script type (use lightning instead of open, (void), enter, etc) which will execute the script every time lightning flashes on the level.
But you do not know when the lightning strikes... at least I don't. If I want a minute to pass between two bolts, I usually need a custom script.
User avatar
Enjay
 
 
Posts: 27144
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Hirogen2 wrote:But you do not know when the lightning strikes... at least I don't. If I want a minute to pass between two bolts, I usually need a custom script.
True, but if you want something to co-incide with the thunder-clap every time it happens, regardless of when it happens, it can be a useful feature.

eg, I have a level that uses a skybox. I use a lighning script to alter the appearance of the skybox whenever the lightning hits.
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

So do I

Code: Select all

script 123 OPEN {
  delay(random(35*2, 35*10));
  changelighttovalue(sector, 255);
  delay(2);
  ambientsound("world/thunder", 127);
  restart;
}
...etc
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

Code: Select all

script 123 lightning {
   ...
}
executes whenever lightning strikes, not necessary to change light values, lightning in MAPINFO will do that for you in sectors with sky as a ceiling (and floor I assume). If you need lightning in a sector without sky then forcelightning(tag) will do it
User avatar
Enjay
 
 
Posts: 27144
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Cyb wrote:If you need lightning in a sector without sky then forcelightning(tag) will do it
Just for completeness, there are 3 relevant sector types I'm aware of:

197 Outdoor lightning - forces the full lightning effect without having F_SKY1 on either the floor or ceiling.

198 Indoor lightning - A duller lightning flash. I think intended for use in rooms with windows to simulate the flash shining in through the window.

199 Indoor lightning brighter - same as 198, but brighter. Presumably for sectors right beside the window etc.
Locked

Return to “Editing (Archive)”