Hi, I’m trying to make a street lamp for my horror game that flickers and I can’t figure out how to make the light bulb and the spot light’s flicker to sync up. Does anyone have a solution to this? Any help is appreciated. Thanks
have you made a street lamp blueprint yet ? and do you have a day and night system?
You make a Custom Event inside your StreetLamp blueprint that turn On/Off both the light bulb and the spot light at the same time. That way when you want to flicker, just call the Custom Event and that event will the be the one to sync those 2 for you.
EDIT: Below is an example with changing dynamic material in it:
- Define the Dynamic Material Instance you’ll be changing in the construction script of your Street Lamp actor.
- The Switch On and Off events that syncs up your Spotlight visibility and Emissive value.
Note: The Emissive value is the multiplier of the LinearColor in the material that defines how glowy the object will be based on color.
Wow. I was not clear enough on what I am trying to do. What I am trying to say is I have a material for my street lamp’s bulb and not an actual light. I want the material to change the emissive color to black at the same exact time that the spot light flickers off on and etc.
The principle is still the same, you’ll have to change the emissive color parameters of the material to black inside the blueprint with the light flickering of on
@Biszark, I have updated my example with images that includes the material. If you rather want a VectorParam (color) instead of the ScalarParam (multiplier), just change the Emissive param from ScalarParam to VectorParam that accepts LinearColor values (R, G, B).