hey guys, kind of a noob questiong as im new to blueprints in UE4,
I have a lamp post where I have attached an emissive yellow light to the bulb area as well as a spot light and an area light complimenting it,
I’ve just learnt how to make flickering lights within the level editor, however it obviously looks weird with the emissive light not being toggled on and off while the lights are flickering.
I have a bunch of suggestions about your blueprint:
First you should probably make a flickering light actor and code the logic the then just place it and have it self sustain itself
Secondly, I don’t see where you link your flickering logic with the rest of your flow in the second screenshot, I assume you’d link that to begin play. Or something that runs once similarly
Thirdly, I remember that there is a repeatable delay, it probably exists for a good reason so you should probably use that instead
For the random numbers: you probably should have flickers happen every 0.5 to 3 seconds and simply set the intensity to 0 instead of changing it to a random number, rapid changes might cancel eachother out as our eyes aggregate frames
For the turning on and off logic you should use a node in flow control made for that, I forgot it’s exact name and the documentation website is down atm, but what it does is that when you go through it the first time it exits through the first exit node then when you get in it again it exits through the second then the first then the second etc, it’s a really good node for toggling things on and off.
You also probably want to have it stay off for at 0.2 seconds if you want people to notice anything, usually flickers in games even have a specific timeline as flickers irl tend to follow a specific pattern, you could do that using a timeline component
Here we use a timeline (you can create one by clicking with RMB in blueprint editor and typing Add timeline) that sets a transition state between current intensity and the last selected one
By changing the length of a timeline you can define how fast lights will flicker. Don’t forget to move the last point to the new length of a timeline when you change its duration though.