class ScriptedLightBaseSource
ScriptedLightBase › EntityLightSource › Entity › ObjectTyped › Object › IEntity › Managed
View all 62 descendants
- PointLightBase
- AnniversaryBoxLight
- AnniversaryMainLight
- BlowtorchLight
- BonfireLight
- BrightnessTestLight
- BuoyLight
- ChemlightLight
- EntranceLight
- ExplosionLight
- ExplosiveLight
- FireplaceLight
- FlareLight
- FlashGrenadeLight
- GoatLight
- MooringBuoyLight
- MuzzleFlashLight
- MuzzleFlashLight_1
- MuzzleFlashLight_2
- PartyLight
- PersonalLight
- PortableGasLampLight
- Roadblock_Light
- RoadflareLight
- ShellLight
- StoveLight
- TirePileLight
- TorchLight
- WarheadStorageLight
- XmasSleighLight
- XmasTreeLight
- ZombieMummyLight
- SpotLightBase
All members, including inherited
Constructors 2
void ScriptedLightBase()Constructor. Everything here is executed before the constructor of all children.
Show 1 more
, m_LifetimeStartvoid ~ScriptedLightBase()Members 27
float m_LifetimeStartfloat m_LifetimeEnd = -1-1 makes this light permanent
float m_FadeOutTime = -1float m_FadeInTime = -1float m_Radiusfloat m_RadiusTargetfloat m_BrightnessShow 3 more
, HandleBlinking(), HandleBrightnessFadeing(), and SetBrightnessTo()float m_BrightnessPulseflicker effect
Show 1 more
, SetBrightnessTo()float m_BrightnessPulseSpeedfloat m_BrightnessPulseAmplitudeMaxShow 1 more
, SetFlickerAmplitudeMax()float m_BrightnessPulseAmplitudeMinShow 1 more
, SetFlickerAmplitudeMin()float m_BrightnessTargetfloat m_BrightnessSpeedOfChange = 1float m_RadiusSpeedOfChange = 1float m_OptimizeShadowsRadius = 0Within this range between the light source and camera the shadows will be automatically disabled to save on performance
float m_DancingShadowsAmplitudefloat m_DancingShadowsSpeedfloat m_BlinkingSpeedprotected int m_HiddenSelectionIDbool m_IsDebugEnabled = falseObject m_ParentAttachment parent
vector m_LocalPosLocal position to my attachment parent
Show 1 more
, HandleDancingShadows()vector m_LocalOriLocal orientation to my attachment parent
vector m_DancingShadowsLocalPosref Timer m_DeleteTimerprotected ref LightDimming m_LightDimmingShow 3 more
, GetDimming(), StopDimming(), and WarheadStorageLight.EOnFrame()static ref set<ScriptedLightBase> m_NightTimeOnlyLights = new set<ScriptedLightBase>()Methods 55
override bool IsScriptedLight()void UpdateMode()private void UpdateLightMode(string slotName)private void DeleteLightWithDelay()Correct way of deleting light from memory. It is necesarry to have this delay due to hierarchy.
Attaches this light on the parent entity, with optional position and orientation offset.
Show 5 more
, Object.SetPosition(), IEntity.Update(), m_LocalOri, m_LocalPos, and m_ParentObject GetAttachmentParent()Returns attachment parent
Attaches this light on the parent entity's memory point, with optional direction target memory point.
Show 15 more
, CarScript.UpdateLightsClient(), Chemlight_ColorBase.CreateLight(), ChristmasTree.ChristmasTree(), FireplaceBase.RefreshFireplaceVisuals(), Flashlight.OnWorkStart(), Headtorch_ColorBase.CreateHeadtorchLight(), Headtorch_ColorBase.OnWasDetached(), Misc_TirePile_Burning_DE.EEInit(), PortableGasLamp.OnWorkStart(), PortableGasStove.OnWorkStart(), Roadflare.OnWorkStart(), CreateLightAtObjMemoryPoint(), TLRLight.OnWorkStart(), UniversalLight.OnWorkStart(), and Wreck_SantasSleigh.Wreck_SantasSleigh()void DetachFromParent()Detaches this light from its parent entity.
Show 6 more
, Object.ToDelete(), Object.ToDelete(), Vector(), m_LocalOri, m_LocalPos, and m_Parentstatic ScriptedLightBase CreateLightAtObjMemoryPoint(typename name, notnull Object target, string memory_point_start, string memory_point_target = "", vector global_pos = "0 0 0", float fade_in_time_in_s = 0)static ScriptedLightBase CreateLight(typename name, vector global_pos = "0 0 0", float fade_in_time_in_s = 0)Creates an instance of light on the given position. Optionally, use fade_in_time_in_s parameter to make the light fade into existence.
Show 5 more
, FadeIn(), CGame.IsDebug(), CGame.IsMultiplayer(), CGame.IsServer(), and typename.ToString()Show 39 more
, Bonfire.EEInit(), CarScript.CreateFrontLight(), CarScript.CreateRearLight(), Chemlight_ColorBase.CreateLight(), ChristmasTree.ChristmasTree(), CivilianSedan.CreateFrontLight(), CivilianSedan.CreateRearLight(), ContaminatedArea_Dynamic.PlayExplosionLight(), ContaminatedArea_Dynamic.PlayFlareVFX(), ExplosivesBase.CreateLight(), FireplaceBase.RefreshFireplaceVisuals(), FireworksLauncherClientEvent.SpawnLight(), FlammableBase.UpdateLight(), FlareSimulation.OnActivation(), FlashGrenade.CreateLight(), Flashlight.OnWorkStart(), Hatchback_02.CreateFrontLight(), Hatchback_02.CreateRearLight(), Headtorch_ColorBase.CreateHeadtorchLight(), Land_Underground_Entrance.HandleVisualPlayback(), Misc_TirePile_Burning_DE.EEInit(), Offroad_02.CreateFrontLight(), Offroad_02.CreateRearLight(), OffroadHatchback.CreateFrontLight(), OffroadHatchback.CreateRearLight(), PlayerBaseClient.CreatePersonalLight(), PortableGasLamp.OnWorkStart(), PortableGasStove.OnWorkStart(), Roadflare.OnWorkStart(), CreateLightAtObjMemoryPoint(), Sedan_02.CreateFrontLight(), Sedan_02.CreateRearLight(), Spotlight.OnWorkStart(), TLRLight.OnWorkStart(), Truck_01_Base.CreateFrontLight(), Truck_01_Base.CreateRearLight(), UniversalLight.OnWorkStart(), WeaponParticlesBase.OnActivate(), and Wreck_SantasSleigh.Wreck_SantasSleigh()void SetBrightnessTo(float value)Sets the brightness of the light
Show 2 more
, m_BrightnessPulse, and m_BrightnessTargetShow 42 more
, BlowtorchLight.BlowtorchLight(), BonfireLight.BonfireLight(), BrightnessTestLight.BrightnessTestLight(), BrightnessTestLight.OnFrameLightSource(), BuoyLight.BuoyLight(), CarLightBase.AggregateLight(), CarLightBase.SegregateLight(), CarRearLightBase.SetAsSegregatedBrakeLight(), CarRearLightBase.SetAsSegregatedReverseLight(), ChemlightLight.ChemlightLight(), EntranceLight.EntranceLight(), EntranceLightStairs1.EntranceLightStairs1(), ExplosionLight.ExplosionLight(), ExplosiveLight.ExplosiveLight(), FireplaceLight.FireplaceLight(), FlareLight.FlareLight(), FlashGrenadeLight.FlashGrenadeLight(), FlashlightLight.FlashlightLight(), GoatLight.GoatLight(), HeadtorchLight.HeadtorchLight(), LightDimming.SetDimmingVal(), MooringBuoyLight.MooringBuoyLight(), MuzzleFlashLight.MuzzleFlashLight(), MuzzleFlashLight_1.MuzzleFlashLight_1(), MuzzleFlashLight_2.MuzzleFlashLight_2(), PartyLight.PartyLight(), PersonalLight.PersonalLight(), PistollightLight.PistollightLight(), PortableGasLampLight.PortableGasLampLight(), Roadblock_Light.Roadblock_Light(), RoadflareLight.RoadflareLight(), FadeIn(), ShellLight.ShellLight(), SpotlightLight.SpotlightLight(), StoveLight.StoveLight(), TirePileLight.TirePileLight(), TorchLight.TorchLight(), UniversallightLight.UniversallightLight(), WarheadStorageLight.WarheadStorageLight(), XmasSleighLight.XmasSleighLight(), XmasTreeLight.XmasTreeLight(), and ZombieMummyLight.ZombieMummyLight()void CorrectLightPulseDuringDaylight()Call this after using SetBrightness(...) to fix light's intensity during daytime
Show 1 more
, m_BrightnessPulseFades the brightness of the light to the given value.
void SetRadiusTo(float value)Sets the radius of the light
Show 41 more
, BlowtorchLight.BlowtorchLight(), BonfireLight.BonfireLight(), BrightnessTestLight.BrightnessTestLight(), BuoyLight.BuoyLight(), CarLightBase.AggregateLight(), CarLightBase.SegregateLight(), CarRearLightBase.SetAsSegregatedBrakeLight(), CarRearLightBase.SetAsSegregatedReverseLight(), ChemlightLight.ChemlightLight(), EntranceLight.EntranceLight(), EntranceLightStairs1.EntranceLightStairs1(), ExplosionLight.ExplosionLight(), ExplosiveLight.ExplosiveLight(), FireplaceLight.FireplaceLight(), FlareLight.FlareLight(), FlashGrenadeLight.FlashGrenadeLight(), FlashlightLight.FlashlightLight(), GoatLight.GoatLight(), HeadtorchLight.HeadtorchLight(), MooringBuoyLight.MooringBuoyLight(), MuzzleFlashLight.MuzzleFlashLight(), MuzzleFlashLight_1.MuzzleFlashLight_1(), MuzzleFlashLight_2.MuzzleFlashLight_2(), PartyLight.PartyLight(), PersonalLight.PersonalLight(), PistollightLight.PistollightLight(), PistollightLight.UpdateLightMode(), PortableGasLampLight.PortableGasLampLight(), Roadblock_Light.Roadblock_Light(), RoadflareLight.RoadflareLight(), ShellLight.ShellLight(), SpotlightLight.SpotlightLight(), StoveLight.StoveLight(), TirePileLight.TirePileLight(), TorchLight.TorchLight(), UniversallightLight.UniversallightLight(), UniversallightLight.UpdateLightMode(), WarheadStorageLight.WarheadStorageLight(), XmasSleighLight.XmasSleighLight(), XmasTreeLight.XmasTreeLight(), and ZombieMummyLight.ZombieMummyLight()Fades the radius of the light to the given value.
void Destroy()Switches off the light and deletes it from memory
Show 2 more
, EntityLightSource.SetEnabled(), and m_ParentShow 14 more
, CarScript.CleanupEffects(), ChristmasTree.EEDelete(), Land_Buoy.~Land_Buoy(), Land_MooringBuoy.~Land_MooringBuoy(), Land_Underground_Entrance.CleanUpOnClosedClient(), Land_Underground_Entrance.HandleVisualPlayback(), Land_WarheadStorage_Main.~Land_WarheadStorage_Main(), Land_WarheadStorage_Main.UpdateDoorStateClient(), CheckLifetime(), HandleBrightnessFadeing(), HandleRadiusFadeing(), StaticObj_Roadblock_Wood_Small.EEDelete(), Wreck_SantasSleigh.EEDelete(), and ZmbM_Mummy.~ZmbM_Mummy()void SetLifetime(float life_in_s)Makes the light destroy itself after the given time in seconds. The light will fade out if it's set to do so with SetFadeOutTime(...)
void SetFadeOutTime(float time_in_s)Sets the fade out time in seconds. Fade out begins automatically as the light nears the end of its life time, or when method FadeOut() is called.
Show 40 more
, CarLightBase.CarLightBase(), CarRearLightBase.CarRearLight(), CarRearLightBase.SetAsSegregatedBrakeLight(), CarRearLightBase.SetAsSegregatedReverseLight(), CarScript.BrakeAndReverseRearLight(), ChemlightLight.ChemlightLight(), CivilianSedanFrontLight.CivilianSedanFrontLight(), CivilianSedanRearLight.CivilianSedanRearLight(), EntranceLight.EntranceLight(), ExplosionLight.ExplosionLight(), FireplaceLight.FireplaceLight(), FlareLight.FlareLight(), FlashlightLight.FlashlightLight(), GoatLight.GoatLight(), Hatchback_02FrontLight.Hatchback_02FrontLight(), Hatchback_02RearLight.Hatchback_02RearLight(), HeadtorchLight.HeadtorchLight(), MuzzleFlashLight.MuzzleFlashLight(), MuzzleFlashLight_1.MuzzleFlashLight_1(), MuzzleFlashLight_2.MuzzleFlashLight_2(), Offroad_02FrontLight.Offroad_02FrontLight(), Offroad_02RearLight.Offroad_02RearLight(), OffroadHatchbackFrontLight.OffroadHatchbackFrontLight(), OffroadHatchbackRearLight.OffroadHatchbackRearLight(), PartyLight.PartyLight(), PistollightLight.PistollightLight(), PortableGasLampLight.PortableGasLampLight(), Roadblock_Light.Roadblock_Light(), RoadflareLight.RoadflareLight(), Sedan_02FrontLight.Sedan_02FrontLight(), Sedan_02RearLight.Sedan_02RearLight(), SpotlightLight.SpotlightLight(), StoveLight.StoveLight(), TirePileLight.TirePileLight(), TorchLight.TorchLight(), Truck_01FrontLight.Truck_01FrontLight(), Truck_01RearLight.Truck_01RearLight(), UniversallightLight.UniversallightLight(), WarheadStorageLight.WarheadStorageLight(), and ZombieMummyLight.ZombieMummyLight()void FadeOut(float time_in_s = -1)Starts the fade out process and destroys the light when its done. Optional parameter allows you to set time of this fade out in seconds. If not set, then default value (from SetFadeOutTime(...)) is used.
Show 20 more
, Bonfire.EEDelete(), CarScript.NoRearLight(), CarScript.UpdateLightsClient(), Chemlight_ColorBase.OnWorkStop(), FireplaceBase.~FireplaceBase(), FireplaceBase.RefreshFireplaceVisuals(), FlammableBase.OnWorkStop(), FlareSimulation.~FlareSimulation(), Flashlight.OnWorkStop(), Headtorch_ColorBase.OnWorkStop(), Misc_TirePile_Burning_DE.EEDelete(), PortableGasLamp.OnWorkStop(), PortableGasStove.OnWorkStop(), Roadflare.EEDelete(), Roadflare.OnWorkStop(), Spotlight.OnSwitchOff(), Spotlight.OnWorkStop(), TLRLight.OnWorkStop(), UniversalLight.OnWorkStop(), and ZmbM_Mummy.OnDamageDestroyed()void FadeIn(float time_in_s)Makes the light fade into existence. Works only at the moment the light is created. Consider using FadeBrightnessTo(...) and FadeRadiusTo(...) at anytime later during lifetime.
Show 24 more
, CivilianSedanFrontLight.CivilianSedanFrontLight(), CivilianSedanRearLight.CivilianSedanRearLight(), EntranceLight.EntranceLight(), FlareLight.FlareLight(), Hatchback_02FrontLight.Hatchback_02FrontLight(), Hatchback_02RearLight.Hatchback_02RearLight(), HeadtorchLight.HeadtorchLight(), MuzzleFlashLight.MuzzleFlashLight(), MuzzleFlashLight_1.MuzzleFlashLight_1(), MuzzleFlashLight_2.MuzzleFlashLight_2(), Offroad_02FrontLight.Offroad_02FrontLight(), Offroad_02RearLight.Offroad_02RearLight(), OffroadHatchbackFrontLight.OffroadHatchbackFrontLight(), OffroadHatchbackRearLight.OffroadHatchbackRearLight(), PortableGasLampLight.PortableGasLampLight(), Roadblock_Light.Roadblock_Light(), RoadflareLight.RoadflareLight(), CreateLight(), Sedan_02FrontLight.Sedan_02FrontLight(), Sedan_02RearLight.Sedan_02RearLight(), SpotlightLight.SpotlightLight(), Truck_01FrontLight.Truck_01FrontLight(), Truck_01RearLight.Truck_01RearLight(), and WarheadStorageLight.WarheadStorageLight()void AddLifetime(float life_in_s)Prolongs the lifetime of the light in seconds. Use negative number to shorten its lifetime.
Override this for custom functionality
On frame event. If you want to control your light within your own rules then override the event OnFrameLightSource and put your code there.
void SetDancingShadowsAmplitude(float max_deviation_in_meters)Sets the maximum range of the point light within the dancing shadows effect
Show 10 more
, FireplaceLight.SetInteriorMode(), FlareLight.FlareLight(), GoatLight.GoatLight(), PortableGasLampLight.PortableGasLampLight(), RoadflareLight.RoadflareLight(), StoveLight.StoveLight(), TirePileLight.TirePileLight(), TorchLight.TorchLight(), XmasTreeLight.XmasTreeLight(), and ZombieMummyLight.ZombieMummyLight()void SetDancingShadowsMovementSpeed(float speed_in_meters_per_frame)Sets the maximum speed of the point light within the dancing shadows effect
Show 10 more
, FireplaceLight.SetInteriorMode(), FlareLight.FlareLight(), GoatLight.GoatLight(), PortableGasLampLight.PortableGasLampLight(), RoadflareLight.RoadflareLight(), StoveLight.StoveLight(), TirePileLight.TirePileLight(), TorchLight.TorchLight(), XmasTreeLight.XmasTreeLight(), and ZombieMummyLight.ZombieMummyLight()float GetDancingShadowsAmplitude()Returns max movement range of pointlight within the dancing shadow effect
float GetDancingShadowsMovementSpeed()Returns max movement speed of pointlight within the dancing shadow effect
void SetSelectionID(int id)void UpdateLightSourceMaterial(string path)void EnableDebug(bool state)Enables some debug functionality of this light
Show 15 more
, ParticleManager.PlayInWorld(), Math.RandomFloat(), IEntity.RemoveChild(), Particle.SetParticleParam(), Object.SetPosition(), Object.ToDelete(), IEntity.Update(), Vector(), ParticleList.DEBUG_DOT, m_DancingShadowsAmplitude, m_DancingShadowsLocalPos, m_DancingShadowsSpeed, m_IsDebugEnabled, m_LocalPos, and m_ParentShow 2 more
, m_BrightnessPulseAmplitudeMin, and m_BrightnessPulseSpeedvoid SetFlickerSpeed(float speed)Sets speed of light flickering (random brightness coefficient change per second)
Show 10 more
, FireplaceLight.FireplaceLight(), FlareLight.FlareLight(), GoatLight.GoatLight(), PortableGasLampLight.PortableGasLampLight(), RoadflareLight.RoadflareLight(), StoveLight.StoveLight(), TirePileLight.TirePileLight(), TorchLight.TorchLight(), XmasSleighLight.XmasSleighLight(), and ZombieMummyLight.ZombieMummyLight()void SetFlickerAmplitude(float coef)Sets the change coefficient of flickering light. (0.0 - 1.0 values, result of greater values are period time of light off )
void SetFlickerAmplitudeMax(float coef)void SetFlickerAmplitudeMin(float coef)float GetFlickerAmplitudeCoefMax()Returns flicker amplitude maximum
float GetFlickerAmplitudeCoefMin()Returns flicker amplitude minimum
void TryShadowOptimization()Optimizes shadows by disabling them on this light source while it's within the given radius around the camera.
Show 2 more
, EntityLightSource.SetCastShadow(), and m_OptimizeShadowsRadiusvoid SetDisableShadowsWithinRadius(float radius_in_m)When the light source gets within this radius (radius_in_m) around the camera, then it's shadows are disabled.
float GetDisableShadowsWithinRadius()Returns the range you put inside SetDisableShadowsWithinRadius(...)
void CheckIfParentIsInCargo()private void CheckFadeOut(int current_time)Show 2 more
, m_FadeOutTime, and m_LifetimeEndprivate void HandleBrightnessFadeing(float timeSlice)Show 4 more
, m_Brightness, m_BrightnessPulse, m_BrightnessSpeedOfChange, and m_BrightnessTargetprivate void HandleRadiusFadeing(float timeSlice)Show 2 more
, m_RadiusSpeedOfChange, and m_RadiusTargetvoid SetBlinkingSpeed(float _speed)Sets blinking speed (no blinking if speed <= 0)
private void HandleBlinking(float time)Show 2 more
, m_BlinkingSpeed, and m_Brightnessvoid EnableDimming(float baseBrightness, DimmingConfig dimCfg)LightDimming GetDimming()