Dynamic Lights switch?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
DoomGuy
Posts: 47
Joined: Tue Apr 25, 2006 4:02

Dynamic Lights switch?

Post by DoomGuy »

Is there a way to turn Dynamic Lights off and on? I like using the Dynamic lights instead of increasing the brightness of a sector. It is more realistic but is there a way to turn them completely off and on? I know how to do it with sector lighting but is there a way to do it with Dynamic lights? Thanks!
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Dynamic Lights switch?

Post by Graf Zahl »

Thing_Activate/Thing_Deactivate will do the job.
User avatar
DoomGuy
Posts: 47
Joined: Tue Apr 25, 2006 4:02

Re: Dynamic Lights switch?

Post by DoomGuy »

Thanks Graf!
User avatar
DoomGuy
Posts: 47
Joined: Tue Apr 25, 2006 4:02

Re: Dynamic Lights switch?

Post by DoomGuy »

OK...... I tried it the way I thought it would work but it didn't... I set up a switch on the wall to deactivate when the switch was triggered. But can I turn them back on with the same switch? How would I do it? Do I need to use it in a script or what? Can you give me an example of turning off a Dynamic Light with ID 56? Thanks in advance for the additioinal help.
User avatar
NeoHippo
Posts: 408
Joined: Tue Sep 13, 2005 0:47
Location: British Columbia Canada

Re: Dynamic Lights switch?

Post by NeoHippo »

Since you cannot set up dynamic lights with a script, the dynamic light will be on at the start of the map.
Then use Thing_deactivate and Thing_activate either with a linedef or a script.

Image


If the dynamic light must be off at the start of the map, then do it with an OPEN script.

Code: Select all

#include "zcommon.acs"

script 1 open
{
    Thing_Deactivate (1);
}

If you must use a switch, then the toggle action will have to be accomplished with scripting.
Or you could use two switches, one to turn on and the other to turn off.
User avatar
DoomGuy
Posts: 47
Joined: Tue Apr 25, 2006 4:02

Re: Dynamic Lights switch?

Post by DoomGuy »

I got it now. I was using the wrong ID I used the number of the light instead of assigning a ThingID It shut the l ights off perfectly. Now to see how I can turn them back on with the same switch. Thanks for your help!
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Dynamic Lights switch?

Post by Graf Zahl »

Flagging the light 'dormant' should have the same effect as deactivating it in a script.
Locked

Return to “GZDoom”