Create traffic lights
prop_dynamicwith the following keyvalues:
- World Model = props_c17\Traffic_Light001a.mdl
- Disable Shadows = Yes
- Collide with world = Not solid (necessary when you want to place the lights inside the model or very close to it)
point_spotlightsplaced at roughly the right position near the model
The input and output logic will define how long each light will be visible, this example will use the following durations:
- red and green - 30 seconds
- yellow - 3 seconds
The targetname keyvalue defines the name of the entities, the three point_spotlights should use the following names respectively: "greenLight" "redLight" "yellowLight". The first logic_relay will be named "traffLightRelay1" and the second one "traffLightRelay2".
The logic_auto requires the following output:
|My Output||Target Entity||Target Input||Parameter||Delay||Only Once|
Add these outputs to the first logic_relay:
Add these outputs to the second logic_relay:
Now the map can be compiled and the traffic lights should be working!