Enhanced Trafficlights | Preview
This scripts is basically an updated version of the Smart Trafficlights script, but it solves the problem of sync issues and AI not driving when the lights turn green.
In depth details
The Enhanced Trafficlights Script was created to address synchronization issues between AI and players in a game regarding traffic light overriding behavior. Initially, the traffic lights only affected the player's view, without influencing AI behavior. After thorough research, it was discovered that there was no native game function to alter AI responses to changing traffic light states. To solve this, we implemented vector math to identify intersections and categorize nearby traffic lights based on their orientation. This allowed for the determination of which lights should be green or red, leading to improved AI behavior where vehicles stop at red lights and proceed on green. The script currently works 90% of the time and is continually being refined. The script is free, open-source, and open for contributions from the community.Features:
- Every light around an intersection will be affected by changes
- AI will stop / drive at red / green lights
- Set the waiting time until a light turns green
- updates in real time for every player on the server
- optimized to be 0.00ms idle & ~0.06 use (only for like 0.5sec)
API (WIP)
- An API is currently in the making to ensure support for 3rd party scripts
- An existing export is available but usage is not recomended at this time (update v1.0.0)
Download
Click here to download the latest release (Please download the .rar file to avoid any issues)
Code is accessible | Yes |
Subscription-based | No |
Lines (approximately) | ~1000 |
Requirements | None |
Support | Yes |