Page 1 of 1

Mutliple Dynamic Lights possible bug/limitation

Posted: Sun Jun 22, 2014 15:33
by Enjay
I think this has always worked like this and it may well be how it's meant to be but, just in case...

It is possible to add two dynamic lights to an actor at the same time. The definition for the blur sphere in lights.pk3, for example, does this. However, it seems to require one light to be given to the sprite "family" name and subsequent lights to be given to individual frames. This means that two totally different lights cannot be added to different frames within the same actor.

Example attached. In the foreground centre, there is an actor with a single white light attached. To one side there is an actor with an offset red light and to the other side is an actor with a blue light. This are just there to check that the definitions work.

In the background is a fourth actor. This has the white light attached to all frames and the red and blue lights attached to alternate frames. If you load up the file, it works as intended: the fourth actor has a constant white light and alternating red and blue lights.

Relevant section of Doomdefs:
[spoiler]

Code: Select all

object TestLamp4
{
    frame TLMP { light TestLight1 }

    frame TLMPA { light TestLight2 }
    frame TLMPB { light TestLight3 }
}
[/spoiler]

Image

If, however, the Doomdefs is altered so that the white light is only attached to frame A:

[spoiler]

Code: Select all

object TestLamp4
{
    frame TLMPA { light TestLight1 }

    frame TLMPA { light TestLight2 }
    frame TLMPB { light TestLight3 }
}
[/spoiler]

Then the white light (which I hoped would switch on and off with frame A, but also be there at the same time as the red light) doesn't work at all (it is presumably being overwritten by the second allocation of a light to frame A).

Image

As I said, this could well be how it is meant to be but I thought that it was worth checking.

Re: Mutliple Dynamic Lights possible bug/limitation

Posted: Sun Jun 22, 2014 17:01
by Blue Shadow

Re: Mutliple Dynamic Lights possible bug/limitation

Posted: Sun Jun 22, 2014 17:26
by Graf Zahl
This is not a bug but a limitation of how the definition works. Timmie has done some strange things there that were carried over to GZDoom. Essentially you can attach a light to a sprite and to a frame but only one to each. What you try is attaching a second light to a frame and that's simply not supported.

Re: Mutliple Dynamic Lights possible bug/limitation

Posted: Tue Jun 24, 2014 14:49
by NeuralStunner
What happens if you attach a light to a frame through GLDefs and another one to the same frame in Decorate?