Author Topic: Need Traffic Lights On My Server  (Read 287 times)

I need someone who's good with relays to make some traffic lights. It goes from Red>Green>Yellow>Red>so forth. Green is 15 seconds, yellow is 5 seconds, and red is 20 seconds.
It would be made (like a proper traffic light) so that one direction is green while the other is red. Then they swap like a normal intersection.

I have a traffic light intersection base thing I have that I can dupe with the Duplicator. So I can dupe them around the map.

Obviously, I'd also need a little building or something with a button you click once to set the lights.

Help would be greatly appreciated. My server is Jack Foxtrot's Clusterfox or something like that. I'm not good with relays (hence why I'm asking) and I know some of you out there are.

By the way, I have a traffic light brick pack, and the individual lights in the traffic lights are actually separate bricks.

They should have their corresponding color lights, and then the lights should have glow effects. Like I said, I've already made a traffic intersection base with pre-named traffic lights.

Thanks.

let me know if you need more help with it later

Place a brick and figure out what direction north is. Thisíll be your activator brick.

On that brick, and put these events on it:
(0) OnActivate > Self > FireRelayNorth

Place a brick to the north of that one, and put these events on it:
(0) OnRelay > NamedBrick > greenlights > setcolorfx > Glow
(0) OnRelay > NamedBrick > greenlights > setlight > Green
(15000) OnRelay > NamedBrick > greenlights > setcolorfx > None
(15000) OnRelay > NamedBrick > greenlights > setlight > None
(15000) OnRelay > Self > FireRelayNorth

Place a brick to the north of that one, and put these events on it:
(0) OnRelay > NamedBrick > yellowlights > setcolorfx > Glow
(0) OnRelay > NamedBrick > yellowlights > setlight > Yellow
(5000) OnRelay > NamedBrick > yellowlights > setcolorfx > None
(5000) OnRelay> NamedBrick > yellowlights > setlight > None
(5000) OnRelay > Self > FireRelayEast

Place a brick to the east of the most northernly one, and put these events on it:
(0) OnRelay > NamedBrick > redlights > setcolorfx > Glow
(0) OnRelay > NamedBrick > redlights > setlight > Red
(20000) OnRelay > NamedBrick > redlights > setcolorfx > None
(20000) OnRelay > NamedBrick > redlights > setlight > None
(20000) OnRelay > Self > FireRelaySouth

Place a brick to the south of that brick, and put these events on it:
(0) OnRelay > Self > FireRelayWest

That should be good but I did this pretty fast on my phone so mightíve made a mistake. Lmk if need additional help or if something isnít clear.

built up pretty much that, but only named the red lights and had them chain from there, with one activator brick for all of the lights
and he decided all the lights should be in unison, so no randomizing the starts

would've been more fun to not use named bricks and use projectiles, but to each their own :cookieMonster:

Yea anyway works and thereís definitely more efficient designs than what I posted. I think there would be a delay between the lights due to the time of the relay but I considered that negligible.

Iím also genuinely intrigued by the idea of a projectile system. Thought Iíve learned all I could about their properties but maybe not.

Glad everything worked out in the end though.

I wonder if there's an efficient way that wouldn't cause it to have too many relay events at once when there's several lights.

stagger the lights
if you're trying to have all the lights change at once, then everything happens at once :I