How to set frequency of glowing/flickering spotlights?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

How to set frequency of glowing/flickering spotlights?

Post by Tormentor667 »

The angle doesn't work for a reason, so how can I set the speed of the flickering and glowing for the spotlights? Didn't find a wiki entry.
User avatar
AFADoomer
Posts: 1326
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: How to set frequency of glowing/flickering spotlights?

Post by AFADoomer »

It looks like this may need to be a feature suggestion (or does this count as a bug? It never worked, so...).

Internally, the flicker frequency is controlled by the 'specialf1' variable; all dynamic lights (including spotlights) automatically have their 'specialf1' variable initialized with the actor's normalized angle in their BeginPlay call. Obviously this isn't a valid solution for spotlights, since they are directional.

Something like this in ZScript works right now as a workaround:

Code: Select all

class SpotlightFlickerAbjustable : SpotlightFlicker replaces SpotlightFlicker
{
	int user_frequency;

	override void PostBeginPlay()
	{
		Super.PostBeginPlay();

		specialf1 = user_frequency;
	}
}
You can set the 'user_frequency' variable via UDMF, and it will affect the spotlight's flicker frequency on spawn... But an engine-side change to add another dynamic light actor property and/or variable for frequency that would override angle if set on any dynlight would probably be better.

I can add something like this this to BoA if you want... Just know that we may want to go back and replace them all in the future.
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: How to set frequency of glowing/flickering spotlights?

Post by Tormentor667 »

Well, I guess it makes more sense to have this engine-side added :)
Post Reply

Return to “Mapping”