Traffic lights are a part of ucars that allows cars nearby to be held, unable to move, when off and allowed to move when on.
- Traffic light waiting block
- This is located under all of the effected cars. It can either be built into the road, or be hidden 1 block underneath. By default this is a quartz block(smooth). The block used can be configured.
- Redstone lamp
- This is the component that decides if the traffic light is in 'go' mode (lamp on) or in 'stop' mode (lamp off). The lamp is turned on and off with redstone.
- This is the vehicle that is stopped at the specified position. Cars only stop when (1 or 2 blocks) above a waiting block!
- [TrafficLight] sign
- This is what tells ucars that the configuration is a traffic light. This goes 1 block away from the redstone lamp and must have [TrafficLight] written on the second line.
- Start by placing your traffic light waiting blocks where you would like your cars to stop. Either in the road below, or beneath the road itself.
- Next, Place a redstone lamp within a 3x3 cylinder of the all the affected waiting blocks. The cylindrical lamp detection radius extends 5 blocks above the road and 3 blocks below.
The cylinder's outline is a bit like this.
- Now Create a [TrafficLight] sign on a block next to the redstone lamp. Make sure that "[TrafficLight]" is written on the 2nd line of the sign!
- Finally Wire up the lamp with redstone. When the lamp is on, the cars will go. When the lamp is off, the cars that are above the waiting blocks will wait!
As in the picture at the top of this page, this can be used to make a full functional set of traffic lights! :)
As this feature essentially allows knowledgeable redstoners to control if cars can move or not, there are alot of possibilities.
For example, a fully automated start sequence can be made with this that will freeze the cars during the "3..2..1..", but will allow then to leave when it gets to "Go!".
Notice how to achieve this that the underside of the affected stretch of racetrack is a sheet of waiting blocks and that they are all linked to redstone lamps (With [TrafficLight] signs attached) underneath the track at a set interval. When the lights are activated (By redstone) the race begins!