Level Blueprint turning on street lights at day and off at night
Hey everyone! So I don't really know what to do, I want to turn on my street lights at night and off on day time in my Level BP.
I have some street lights in my level with Point lights, the problem is that I cannot think of any way to turn them on and off when it is day and night. Help is greatly appreciated.
asked Sep 27 '17 at 07:05 PM in Blueprint Scripting
So you're light should be set to movable because static or stationary light gets baked and therefore cannot be turned off properly. Asuming you have done that you can easily get a direct reference to the asset inside the level blueprint. Just click on the asset inside the level and right click in the level blueprint. Third thing is how you determine day and night. Here, you can simply use a timer by event that triggers the event after a specific time.
You cannot call any event in the level blueprint from outside. So you have to either do the day/night change inside the level blueprint or create a light manager class inside the level which is storing references of all lights in an exposed array. You can then just get a reference from wherever you do your day/night calculation to that actor and let the actor handle the light off/on switching.
answered Sep 27 '17 at 07:49 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here