The online racing simulator
LFSLapper:Cruise TrafficLightSystem
Hello,

I had this script laying around, which was used for a cruiseserver. The cruiseserver shut down for a while now, and i dont think it will be restarted anytime soon.
So i thought to edit the system for public use. Because it had some functions and variables from the main cruiseinsim.

Some features may not work properly, althought i tested some stuff and it seems to work fine. Please let me know if something isnt working, so i can look into it and fix it (if possible).
Describe the bug so detailed as possible.

Download cruise_trafficlight.txt and change the extention from .txt to .lpr.
Add the file into you 'includes' folder and add the script into addonsused.lpr


Features:
  • Create/Load/Save/Edit intersections
  • Enable/Disable intersections: light will blink yellow.
  • Add Startlights + Edit their ID's
  • Camerasystem for speeding and running red light
  • Automatic/Manual system for light sequence.
Todo list:
  • Speedlimit for each light
It is possible to save the intersections you created.
You can do that by remove the # infront of:
#GlobalVar $TrafficLightFolder; $TrafficLightFolder = "C:\Users\Danny\Desktop\SavedTrafficLights";

and set your own folder to save/load your intersections.

=========================================
How to setup a intersection:
=========================================
  • Add with the LayoutEditor some Startlights and give the lights a ID number
  • Add insimcircles so system sets the approaching Light to the player.
  • Add Insim finishlines for the redlight/speedcam system.
  • Type !trafficlight and create an intersection
  • Add the lights and set the lightID's (same ID's you used in the layoutbuilder)
  • To enable camerasystem. Set the camera to "1" and change the incimcircle ID's (same ID's you used in the layoutbuilder)
  • Enable the intersection by set the control to "AUTO" and Set the Intersection to "ON"


Attached images
TF#1.PNG
TF#2.PNG
TF#3.PNG
TF#4.PNG
Attached files
cruise_trafficlight.txt - 42.2 KB - 155 views
Wow, this is a very nice system with a great GUI.
I am sure people will start using this, so thanks for sharing and making this.
Quote from Yisc[NL :;1967450"]Wow, this is a very nice system with a great GUI.
I am sure people will start using this, so thanks for sharing and making this.

Thank you Smile

FGED GREDG RDFGDR GSFDG