How to set frequency of glowing/flickering spotlights?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!
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.

How to set frequency of glowing/flickering spotlights?

Postby Tormentor667 » Fri Dec 28, 2018 1: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.
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

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

Postby AFADoomer » Sat Dec 29, 2018 12:29 pm

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 allExpand view
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
AFADoomer
 
Joined: 15 Jul 2003

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

Postby Tormentor667 » Sat Dec 29, 2018 2:45 pm

Well, I guess it makes more sense to have this engine-side added :)
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany


Return to Mapping

Who is online

Users browsing this forum: No registered users and 2 guests