Is there a method of setting up dynamic Lighting (lights with only activate at night) on a map? I've seen that some maps contain them (Nadeox1's VR_city for example) I think it would be a cool addition to the map I'm working on. Thanks in advance Euro T.
Solved. Used the data from @Nadeox1's VR_city map to create the effect I wanted The file I used was mainLevel.lua Spoiler Code: local M = {} local function setAllLightsEnabled(group, value) for i = 0, group.obj:getCount(), 1 do local id = group.obj:idAt(i) local obj = scenetree.findObjectById(id) if obj and obj.obj:isSubClassOf('LightBase') then obj.obj:setLightEnabled( value ) end end end local lastValue = nil local function onUpdate() local tod = scenetree.tod if not tod then return end local value = true if tod.time > 0.1 and tod.time < 0.5 then value = false end if lastValue == value then return end lastValue = value if scenetree.DynamicLights then setAllLightsEnabled(scenetree.DynamicLights, value ) end if scenetree.MissionLights then setAllLightsEnabled(scenetree.MissionLights, value ) end end M.onUpdate = onUpdate return M