Dynamic Lights switch?
Moderator: Graf Zahl
- 
				DoomGuy
														 - Posts: 47
 - Joined: Tue Apr 25, 2006 4:02
 
Dynamic Lights switch?
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!
			
			
									
						
										
						- 
				Graf Zahl
														 - GZDoom Developer

 - Posts: 7148
 - Joined: Wed Jul 20, 2005 9:48
 - Location: Germany
 
Re: Dynamic Lights switch?
Thing_Activate/Thing_Deactivate will do the job.
			
			
									
						
										
						- 
				DoomGuy
														 - Posts: 47
 - Joined: Tue Apr 25, 2006 4:02
 
Re: Dynamic Lights switch?
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.
			
			
									
						
										
						- 
				NeoHippo
														 - Posts: 408
 - Joined: Tue Sep 13, 2005 0:47
 - Location: British Columbia Canada
 
Re: Dynamic Lights switch?
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.

If the dynamic light must be off at the start of the map, then do it with an OPEN script.
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.
			
			
									
						
										
						Then use Thing_deactivate and Thing_activate either with a linedef or a script.

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.
- 
				DoomGuy
														 - Posts: 47
 - Joined: Tue Apr 25, 2006 4:02
 
Re: Dynamic Lights switch?
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!
			
			
									
						
										
						- 
				Graf Zahl
														 - GZDoom Developer

 - Posts: 7148
 - Joined: Wed Jul 20, 2005 9:48
 - Location: Germany
 
Re: Dynamic Lights switch?
Flagging the light 'dormant' should have the same effect as deactivating it in a script.