lightNing
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.
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.
-
Biff
- Posts: 1061
- Joined: Wed Jul 16, 2003 5:29 pm
- Location: Monrovia, CA, USA
-
Zell
- Posts: 791
- Joined: Thu Jul 24, 2003 7:47 am
- Location: IN A GODDAMN BOX[In Erie.]
-
Eevee
- Posts: 592
- Joined: Wed Jul 16, 2003 5:26 am
-
Zell
- Posts: 791
- Joined: Thu Jul 24, 2003 7:47 am
- Location: IN A GODDAMN BOX[In Erie.]
-
Eevee
- Posts: 592
- Joined: Wed Jul 16, 2003 5:26 am
-
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
Here is what I have done in my ROTT P/T conversion:
(A skybox that is!)
It's cool. 
(A skybox that is!)
Code: Select all
script 1 OPEN {
delay(35 * random(9, 15));
Light_ChangeToValue(id, 255);
delay(4);
Light_ChangeToValue(id, 144); // previous light setting
delay(4);
AmbientSound("world/thunder");
restart;
}
-
Enjay
-

- Posts: 27298
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Info:
A slight problem with skyboxes that Randy fixed was that they (usually) do not have F_SKY on the floor or ceiling - so do not flash when the lighning special is used in mapinfo. So, he invented the "outdoor lighning" sector special (type 197). That will flash the sector as if it had F_SKY on it's floor ceiling.
There are also 198 (indoor lightning) and 199 (indoor lightning - brighter) to simulate areas next to windows etc.
It is also possible to use a "lightning" script. This is a script that gets executed everytime the lightning flashes. Use the word lightning instead of open, enter, (void) etc. I have used this to briefly flash lightning bolts across the sky in a skybox using a very simple script. No need to worry about changing light levels or anything, because sector type 197 has it covered.
Possibly easier to do than Hirogen2's suggestion, but somtimes a fully scripted version is desirable (eg if you change the weather mid level).
Also,
If you do not want to use a skybox to show lightning across the sky, you can use 2 skies - defined in MAPINFO. The regular sky gets shown most of the time, but when the lightning flashes, a second sky gets shown briefly. For an example, see http://members.lycos.co.uk/Enjay001/ . Scroll about half way down the page and DL "redsky.wad" However, there is something screwy going on with that site. When I check it from work, I can DL files no problem. When I check it from home, I get told the file is being linked to from an external site, then get redirected back to the site to try again - with the same result. So, it may or may not work for you. I have told Lycos about the problem, but no response so far.
A slight problem with skyboxes that Randy fixed was that they (usually) do not have F_SKY on the floor or ceiling - so do not flash when the lighning special is used in mapinfo. So, he invented the "outdoor lighning" sector special (type 197). That will flash the sector as if it had F_SKY on it's floor ceiling.
There are also 198 (indoor lightning) and 199 (indoor lightning - brighter) to simulate areas next to windows etc.
It is also possible to use a "lightning" script. This is a script that gets executed everytime the lightning flashes. Use the word lightning instead of open, enter, (void) etc. I have used this to briefly flash lightning bolts across the sky in a skybox using a very simple script. No need to worry about changing light levels or anything, because sector type 197 has it covered.
Possibly easier to do than Hirogen2's suggestion, but somtimes a fully scripted version is desirable (eg if you change the weather mid level).
Also,
If you do not want to use a skybox to show lightning across the sky, you can use 2 skies - defined in MAPINFO. The regular sky gets shown most of the time, but when the lightning flashes, a second sky gets shown briefly. For an example, see http://members.lycos.co.uk/Enjay001/ . Scroll about half way down the page and DL "redsky.wad" However, there is something screwy going on with that site. When I check it from work, I can DL files no problem. When I check it from home, I get told the file is being linked to from an external site, then get redirected back to the site to try again - with the same result. So, it may or may not work for you. I have told Lycos about the problem, but no response so far.
-
Zell
- Posts: 791
- Joined: Thu Jul 24, 2003 7:47 am
- Location: IN A GODDAMN BOX[In Erie.]
-
Enjay
-

- Posts: 27298
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland