How to set frequency of glowing/flickering spotlights?

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: How to set frequency of glowing/flickering spotlights?

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

by Tormentor667 » Sat Dec 29, 2018 1:45 pm

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

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

by AFADoomer » Sat Dec 29, 2018 11:29 am

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.

How to set frequency of glowing/flickering spotlights?

by Tormentor667 » Fri Dec 28, 2018 12:09 pm

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.

Top