Blau on 16/6/2006 at 14:21
Ok this is just a small tutorial I've devised from what I've learned on how to use flickering lights, in case anyone else was wondering how to make them work. Please PM me if there is anything you see that is wrong/innacurate/just plain friggin stupid *slap*
OK!
How to make lights go flick
First, make a bare room with whatever textures you feel like using.
Now add a light from
Actor->WorldObj->Light->ElectricLight->ElecLamp or from
ElecStreetLight if you prefer.
Right click on the mesh you chose and go into its properties, add the properties
Lighting->LB_FlickerParam and
Lighting->LightColour. There is a property called
Lighting->LightBehaviour, which is noted as telling the engine how the light should behave, but its likely that the light you selected will already have this property in its class, which is also why some of the lights will already have numbers under LB_FlickerParam (theyre already setup for flickering).
Now go into the LB_FlickerParam property you added, and you should see some properties like the ones below-
Inline Image:
http://img156.imageshack.us/img156/7513/flickerparam4mj.jpgThere may already be values in each property, so copy this mesh (if it has values) and place it somewhere else in the room (prefferably somewhere far enough away so it wont intefere with the light the other mesh casts), this lets you see how the different values affect the lighting.
Onto the values then -
BrightnessMax affects how bright the light will get when flickering, any value above one will make your light gem completley light up, values between 0 and 0.99 will have an affect on how visible you are.
BrightnessMin affects how dark the light will become while flickering, all values from 1 and up will make you completley visible etc.
Setting these number to the same value will not create much of an effect, although the light will still be capable of flickering. Setting them both to 1 or above will mean the light will not flicker (it will flicker, but the brightness wont appear to change, so whats the point really).
FlickerActivePeriodMax affects the maximum amount of time the light will spend flickering, how often it flickers during this time is based on TimeOnMax/Min and TimeOffMax/Min.
FlickerActivePeriodMin affects the minimum time the light will spend flickering, this creats a variable flicker that does not have a constant pattern to it. I am not sure wether the engine decides between the max and min values or any value inbetween the max and min when deciding the amount of flicker time.
FlickerDormantPeriodMax seems to affect the amount of time the light spends NOT flickering (that is to say, emitting light based on the LightColour settings).
FlickerDormantPeriodMin therefore affects the minimum amount of time the light spends not flickering.
The FlickerDormant period seems to be a set of values that allow control over how long the light will glow normally after the FlickerActive period has expired. In other words, if you set the FlickerActive max and min to 2, and the FlickerDormant max and min to 5, it will flicker for 2 seconds and glow normally for 5 seconds.
TimeOffMax and
TimeOffMin seem to affect the amount of time the light spends turned off
while flickering, this means you would set it to a number lower than the FlickerActive period (Im talking low like 0.15 or 0.02), otherwise the active flickering period would expire before the light had a chance to actually flicker! The lower you set these numbers the faster the light will appear to flicker.
TimeOnMax and
TimeOnMin affect how long the light spends turned on
while flickering. Similar to the TimeOff period, it needs to be set lower than the FlickerActive period. Lower numbers make it appear to flicker faster.
Notes: The engine seems to select a max or min number after each flicker, so in other words, if TimeOnMax is 1 and TimeOffMax is 0.5 there will be 1.5 seconds until the light turns on again (its on for 1 second, off for half a second, then on again). Then the Min values will also come into it.
The TransitionBias values dont appear to have any use, but may add time onto the corresponding values based on what value you enter (if you put 1 into TimeOnTransitionBias, it may add one second onto the amount of time it spends turned on while flickering). Keep in mind I have no idea if this is the case :)
ElecSteamWallLight is no good for flickering lights, as the light texture on it always appears to be on even when the mesh is casting no light, similar to the windows on outdoor building meshes that always appear to glow.
/Notes
Ok once you have your settings, BuildAll and play the map (making sure you have a playerstart in there DURR).
EXPERIMENT DAMN YOU! There are alot of possibilites with this, its very possible to create a blinking light with these paramters, you could create an enemy that turns lights on as it approaches, or mabye one that makes them go nuts like the monsters in the Shale Bridge Cradle OM do! Have fun!
Blau on 21/6/2006 at 04:58
Quote Posted by GlasWolf
The first use I thought of was a flashing light for your alarm system. I wonder as well if you could have lights flashing in sequence.
Yeah it just takes a bit of maths to get the timing right, or a heap of seperate scripts with longer and longer delays on them.
Quote Posted by Rantako
It all works great, just a few things:
The reason for this is that it actually does have the property - if you click the Show Non-local Props box on the properties window, a heap of pale blue properties will appear. These are set in the gamesys, and any actor you place inherits them. It's also why LB_FlickerParam already has numbers in it.
There's some scripting actions for flickering as well, under Lights, if you want to mention them.
Ah so it already had the property there to begin with, that explains alot.
And wow its really easy to add flickering to a light as it turns on and off, just tried it then and it took like 2 minutes to setup!