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

Need a light?

Recommended Posts

Hello.

I have a few questions about line types 12 and 80 in doom2.exe.

I'm trying to make a walk-line activated light that uses two different light levels when it is turned on:

I have a room with its light level at 128, and a LITE3-style lamp mounted at one wall shining across the room at the opposite wall, in a fan-shape.
The light consists of two sectors, a "border" sector and a "middle" sector.

Since all three sectors - "main room", "border" and "middle" - are all at the same light level initially, I have dummy sectors outside the playing area to control the light levels upon activation. Each dummy is connected to an individual control sector containing the desired light levels.

The line type I use for activation lists as type 12; "W1 Light to MAX neighbor light EXC" in the doom 1.9 specs. When the light is activated, both the "middle" and the "border"'s light levels change to the amount in the control sector that is adjacent only to the dummy of the "middle" part of the light.

In other words, the lamp's light shines equally bright in both sectors. This is the problem.

"Moving" line types in Doom that changes a sector to a minimum/maximum height determines the min/max upon activation, and my results with this light fiasco indicates that the light triggers work differently than the sector moving line types.

Earlier experiments with other sector/line types have revealed errors in the doom 1.9 specs before, but I cannot recall this problem being discussed before.

Can anyone shed some light on this matter?

Share this post


Link to post

Well the two sectors you are trying to control are bordering each other, and hence are included in the MAX calculation.

Maybe you can exploit the exact way the DOOM.exe processes the light change, e.g. the outer sector may need an absolute sector index greater (or smaller) than the inner sector.

Share this post


Link to post

Ajapted said:
Well the two sectors you are trying to control are bordering each other, and hence are included in the MAX calculation.


I know. :)
But when you do the exact same thing with a lift, i.e. having two neighboring sectors connected to two different height sectors, the tagged floors do stop at different levels even though they're supposed to go to "the lowest adjacent floor". That means the moving floors get their destination height at the moment the line is activated. The lights seem to adjust to whatever light value becomes the highest afterwards. I was hoping the line-types for light changes would behave the same way as the elevator ones.

Ajapted said:
Maybe you can exploit the exact way the DOOM.exe processes the light change, e.g. the outer sector may need an absolute sector index greater (or smaller) than the inner sector.


Does "sector index" mean the actual sector number or the light level in this context? So far I have experimented by using lower/higher numbered sidedefs, as some of the type- and texture-changing line types depend on (with little success, of course :).

Share this post


Link to post
Uncle 80 said:

But when you do the exact same thing with a lift, i.e. having two neighboring sectors connected to two different height sectors, the tagged floors do stop at different levels even though they're supposed to go to "the lowest adjacent floor".

I don't think it is clear cut. Make one of those lifts a unit higher or lower, and it probably stops working (depending on the dummy heights).

Does "sector index" mean the actual sector number or the light level in this context?

The actual sector number, as the editor would show (e.g. #123).

Unless your editor has a "swap sector numbers" function, it's going to be a real pain to do it manually, e.g. select the lowest numbered sector, copy it (the copy is now the highest numbered sector on the map), then put the new index in the lines surrounding the original sector.

Share this post


Link to post
Ajapted said:

The actual sector number, as the editor would show (e.g. #123).


Ah, yes. I did try renumbering the sectors, sidedefs, swithing linedef directions - basically everything - but I think I've reached the conclusion that the light triggers work a little differently than the doom 1.9 specs indicate. Reading those,I got the impression that each tagged sector would aquire its new light value from an "adjacent" sector - but instead, all tagged sectors change to the highest light level in any adjacent sector. In other words, one light trigger can only adjust all tagged sectors to the same value. Regardless of sector connections.

Oh well, seems I need a lot of sector tags and triggers for my level, then. Thanks for the suggestions.

Share this post


Link to post

I got a bit of free time to look at the source, and the LightTurnOn/Off linetypes definitely work differently from floor moving types.

LightTurnOn will compute the light value on the lowest numbered tagged sector, and use the same value for every other tagged sector.

You're gonna need two linedefs close together to implement this effect (as I think you already know :).

Share this post


Link to post

Ok, thanks for the input :)

I guess I'll have to put two triggers very close to each other (or the lamp will look tremendously stupid).

Now I'm off to experiment with the other light triggers. :)

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
×