blueprint

Traffic Light System

  • Exposure: public
  • UE Version: 5.3

BoomerFart

October 20, 2023, 5:10 pm

Click the button above, it will automatically copy blueprint in your clipboard. Then in Unreal Engine blueprint editor, paste it with ctrl + v

1 comment

  • BoomerFart

    October 20, 2023, 5:24 pm

    This BP comes from a tutorial from Matt Aspland on youtube and controls 4 traffic light fixtures in the BP. MY BP is a little different in that it controls 4 different light fixtures. Each have 3 point lights, 3 spotlights and 3 emissive textures for red, amber and green.

    The Dynamic material Instance is going to be targeting the VectorParameter in my emissive color for each of the lens materials. The element index HAS to be set to the materials slot it is assigned to on the static mesh or this won't work right.

    Create a blueprint Enumeration with 3 new enumerators. "Green", "Amber", and "Red"

    Create 3 new functions to set visibility on Red, Amber and Green Spot and point lights. I called the functions "Toggle (color) Lights". Add Boolean input to each new function called "On?"

    Create Variables for StartingColor, GreenLightDuration and RedLightDuration (Floats) Ignore the "(color)LightsOn?" Booleans, I made those for PrintStrings so I could verify proper operation. They are not needed. I'm sure there is a much better way to make this system work, however, there are limits to my knowledge of UE5's capabilities and I still have a lot to learn.