I love the smell of UnrealEd crashing in the morning. – tarquin
UE2:ScriptedLight (U2XMP)
From Unreal Wiki, The Unreal Engine Documentation Site
- Package:
- Engine
- Direct subclasses:
- AR_LightEffect, DP_LightEffect, ER_EMPExplosion, GL_EMPEffect, LR_LightEffect, P_LightEffect, SR_LightEffect, S_LightEffect
| This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
NEW: ScriptedLight $Author: Mfox $ $Date: 6/25/02 11:36p $ $Revision: 3 $ Name: ScriptedLight.uc Author: Aaron R Leiby Date: 07 December 1999 Description: A light that can be scripted to change its properties over time. How to use this class:
(Slot 0 is associated with the letter A. 1 is B, 2 is C, etc.)
settings. The color will tween using the associated RGB values
(rather than HSB) to avoid rainbow effects that would be caused by iterating across Hue values. If you want the transition to happen instantly, simply leave this value at zero.
settings for that template, once it reaches it. Once again, this
value can be left at zero if you simply want it to reach the settings and then continue onto the next settings. Most likely, you won't want both TweenToTime and Duration to be zero, since the settings won't show up in that case.
other light. They get converted to RGB values under the hood for
smooth transitioning, but that shouldn't affect how you use them.
Script using that data by filling in the LightScript string.
Note: You should only use the capital letters A...Z. All other ASCII values are undefined. You can use any slot in the ScriptedLightData array. There's nothing sacred about starting with ABC. If you want, you can go right to the end and start with XYZ, or whatever your heart desires. Personally, I don't know what letter the number 14 represents without singing through my alphabet, counting on my fingers. So usually starting with ABC is easiest. I doubt most lights will use more than the first couple slot. In any case, I've provide a quick reference chart to allow you to look up the associated letters. This Script can include any of the set templates, in any order, and may be repeated as many times as desired. (Example: ABCB) This will Use template A, then B, then C, then back to B, then it will start all over again with ABCBABCBABCB... forever. Obviously this will allow for some cool effects.
time for the first template to be used. This is generally used to
make lights that "propogate" -- first one turns on, then the next, then the next... light runner lights at an airport. This value is in seconds. Because this time is only taken into account when the light is first created, it makes it hard to visualize how it will all come out in the editor. In an effort to cater to this, if you turn off real-time mode in the perspective window (the little joystick icon) for more than 3 seconds (or do any other operation that will stop time for more than 3 seconds -- light rebuilding the level or lighting or whatever), this will reset the lights, and they will all start over at the same time, bringing them back into sync.
Quick Reference:
A=0 B=1 C=2 D=3 E=4 F=5 G=6 H=7 I=8 J=9 K=10 L=11 M=12 N=13 O=14 P=15 Q=16 R=17 S=18 T=19 U=20 V=21 W=22 X=23 Y=24 Z=25
[edit] Properties
[edit] Property group 'ScriptedLight'
[edit] bInitiallyOn
Type: bool
Default value: True
[edit] bRandomizeScript
Type: bool
[edit] bReset
Type: bool
[edit] LightScript
Type: string
Repeating light sequence.
[edit] LightScriptRampDown
Type: string
Script executed when turned off (non-repeating).
[edit] LightScriptRampUp
Type: string
Script executed when turned on (non-repeating).
[edit] LightScriptTimeOffset
Type: float
Countdown before execution once turned on.
[edit] ProximityTypes
Type: name
Array size: 8
Default value: Pawn
[edit] ScriptedLightData
Type: ScriptedLightInfo
Array size: 26
ABCDEF...Z
[edit] TimerDuration
Type: float
[edit] Internal variables
[edit] NextScriptedLight
Type: ScriptedLight
Modifiers: private
[edit] SL_Brightness
Type: float
Modifiers: private, transient
[edit] SL_BrightnessRate
Type: float
Modifiers: private, transient
[edit] SL_Color
Type: Object.Vector
Modifiers: private, transient
[edit] SL_ColorRate
Type: Object.Vector
Modifiers: private, transient
[edit] SL_Countdown
Type: float
Modifiers: private, transient
[edit] SL_DesiredBrightness
Type: byte
Modifiers: private, transient
[edit] SL_DesiredColor
Type: Object.Vector
Modifiers: private, transient
[edit] SL_Duration
Type: float
Modifiers: private, transient
[edit] SL_Index
Type: int
Modifiers: private, transient
[edit] SL_Initialized
Type: bool
Modifiers: private, transient
[edit] SL_LastBrightness
Type: float
Modifiers: private, transient
[edit] SL_LastColor
Type: Object.Vector
Modifiers: private, transient
[edit] SL_RampingDown
Type: bool
Modifiers: private, transient
[edit] SL_RampingUp
Type: bool
Modifiers: private, transient
[edit] SL_TweenBrightness
Type: float
Modifiers: private, transient
[edit] SL_TweenColor
Type: Object.Vector
Modifiers: private, transient
[edit] SL_TweenTime
Type: float
Modifiers: private, transient
[edit] Default values
| Property | Value |
|---|---|
| bStatic | False |
| LightType | LT_Scripted |
[edit] Structs
[edit] ScriptedLightInfo
- float TweenToTime
- float Duration
- Doesn't include TweenToTime.
- byte Brightness
- byte Hue
- byte Saturation
[edit] Functions
[edit] Events
[edit] PreBeginPlay
Overrides: Light.PreBeginPlay
[edit] Other instance functions
[edit] TurnOff
[edit] TurnOn
[edit] States
[edit] ProximityBased
Modifiers: simulated
[edit] ProximityBased.BeginState
Overrides: Object.BeginState (global)
[edit] ProximityBased.EndState
Overrides: Object.EndState (global)
[edit] ProximityBased.Touch
Overrides: Actor.Touch (global)
[edit] ProximityBased.UnTouch
Overrides: Actor.UnTouch (global)
[edit] ProximityBased.ValidTouch
[edit] TriggerControl
Modifiers: simulated
[edit] TriggerControl.Trigger
Overrides: Actor.Trigger (global)
[edit] TriggerControl.UnTrigger
Overrides: Actor.UnTrigger (global)
[edit] TriggerTimed
Modifiers: simulated
[edit] TriggerTimed.Timer
Overrides: Actor.Timer (global)
[edit] TriggerTimed.Trigger
Overrides: Actor.Trigger (global)
[edit] TriggerToggle
Modifiers: simulated
[edit] TriggerToggle.Trigger
Overrides: Actor.Trigger (global)
