Toggling visibility with a material and lights

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.

obviously you cant put an object with the “set intensity” node as it doesnt work that way (as far as im aware, it doesnt let me).

So I tried using visibility, I know you can attach lights AND objects to these nodes,

It’s not working out for me, im sure theres something stupid im missing,

Any advice would be great (or some other way of doing it)

I tried setting a timer for the material itself where it turns on and off, but it wasnt snycing with the flickering lights

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

I’d do something like this

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.

When the timeline finished, we set Last Intensity to what the Next Intensity was and a new Next Intensity value at random

Thanks for the advice guys, I’ll get back onto it and adjust