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

Multiple sectors using lighting effects synchronously?

Recommended Posts

http://i.gyazo.com/79782b93ebdfa078f4d0339145d6c166.png
(STARTAN2 is a placeholder, and the map is in Hexen format)

To create the ceiling texture effect, I have to split the corridor into five sectors: three for the ceiling light texture, two for the light-less texture. The only two lighting effects that match the 'broken lights' I'm looking for is Fire Light Flicker and Light Flicker. Fire Light Flicker isn't going to work for this purpose, however.

After some research, I found that Light Flicker works by using a dark sector to have other adjacent sectors dip down to that dark's lighting value at random intervals; Perfect. Problem is, I've experimented with this concept, but can't seem to make all five sectors blink synchronously. Would there be a way to make this work, possibly with dummy sectors or maybe some other form of sector black magic?

Share this post


Link to post

I'm not sure about Hexen format, but I do know that in Vanilla, some sector effects are tied into the order the sectors are created -- effectively, their sector number. Sandy Peterson took advantage of this in the Waste Tunnels to create the timed strobing arrow effect.

To achieve this using the Light Blinks # Hertz sector type, construct your sectors in this order:

1) The ceiling lights first.
2) The immediate area around the lights.
3) Areas further away.
4) Connect all of them to a dummy sector that will ultimately control the lighting values.* Build this last, or even use hidden tunnels. Make sure the sector number order isn't changed.

That's the best I can come up with. I'm not sure if any of the other effects can be synchronized in a similar manner.

* I seem to remember that there is away to pull this off without dummy sectors, but it completely hings on the sector order being perfect and the lighting differences being extreme (such as, 255 to 96 or something to that extent.)

I'll see if I can dig up my Five Rooms of Doom submission where I pulled this off and illustrate it better.

Edit: Arrrggghh, I just read your post again and I have a nagging suspicion this entire post isn't relevant to anything. NEVERMIND.

Share this post


Link to post
BlueFeena said:

Arrrggghh, I just read your post again and I have a nagging suspicion this entire post isn't relevant to anything. NEVERMIND.


I think I got an idea actually, so I gotta thank you. XD

Anyone else got anything?

Share this post


Link to post

If the floor texture and ceiling/floor heights will also be the same for the 3 sectors with FLAT2(or 17?) can they just be merged into the 1 sector?

Share this post


Link to post
traversd said:

If the floor texture and ceiling/floor heights will also be the same for the 3 sectors with FLAT2(or 17?) can they just be merged into the 1 sector?


Yes, which is the case with the sectors that have FLAT2 (The lights) and FLAT19, they individually belong to the same sector ID so I only have to work with, e.g., sectors 1 and 2 instead of 1, 3, 5, and then 2 & 4 (apologies for the mis-distinction). However, regardless of how I pair the sectors with ID's, if I assign any one sector to become the dark sector, it will never blink with the adjacent sectors due to it owning the lowest brightness level and not jumping up to the others (the Light Flicker tag takes a sector and drops the light level down to the least brightest adjacent sector, doesn't work upwards with brighter sectors, sadly).

Share this post


Link to post

http://i.gyazo.com/f3200832edf96b52c6dc8d7f0902a013.png

I was able to use an outside dummy sector linked to the three sectors that contained the light fixture ceiling texture. Those three sections of the room work exactly as planned. The problem now is the two other sections. I can perform the same dummy trick, but the flickering is not in sync. I can also join those two sections with the flickering sector and have the whole ceiling as lights, but that destroys the ceiling texture effect (and I don't give up that easily).

Share this post


Link to post

Since you are mapping for (DOOM in HEXEN) format, presumably using ZDoom, why not make
use of ACS scripting?

110:Light_RaiseByValue (tag, value)
111:Light_LowerByValue (tag, value)
112:Light_ChangeToValue (tag, value)
113:Light_Fade (tag, value, tics)
114:Light_Glow (tag, upper, lower, tics)
115:Light_Flicker (tag, upper, lower)
116:Light_Strobe (tag, upper, lower, u-tics, l-tics)
117:Light_Stop (tag)
210:Transfer_FloorLight (tag)
211:Transfer_CeilingLight (tag)
232:Light_StrobeDoom (tag, u-tics, l-tics)
233:Light_MinNeighbor (tag)
234:Light_MaxNeighbor (tag)

Or, if you use GZDoom, dynamic lights:

130:Thing_Activate (tid)
131:Thing_Deactivate (tid)

Share this post


Link to post
Kappes Buur said:

Since you are mapping for (DOOM in HEXEN) format, presumably using ZDoom, why not make
use of ACS scripting?


It's so funny you say that, I took to ACS on my own accord and used my previous Java knowledge alongside the ACS documentation on the Zdoom wiki to piece together a beautiful little piece of code.

Spoiler

bool loop = true;

do
{
int flick = GetSectorLightLevel (3);
Light_ChangeToValue (4, flick);
Delay (1);
} while(loop);

'3' represents the sector with tag 3, which I assigned to the sector that flicks the light. Immediately, the value is assigned to the sectors with the tag '4', which are the sectors that don't get flicked. That sector now follows the same lighting patterns as the flickering sector. Add a 1-tic delay, start the condition over again.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×