Traffic lights are incapable of stopping anyone else (player/non-vehicle events).
No need for plugin commands/script calls. Vehicles will be blocked automatically when a specified Traffic Light self switch is ON.
How to Use
You Need:
Traffic lights that alternate colors based on self-switches.
RoadBlock events (empty pages, only their event names are important) that block vehicles.
Plugin Parameters:
Vehicle Names: car,bus,truck would have any event with names containing car, bus, or truck stopped at RoadBlock when the relevant traffic light is red.
Traffic Light Names and Road Blocker Names: Tell the plugin the traffic light name that is connected to each type of roadblock. e.g. Traffic Light NS makes RoadBlock NS stop cars when it is red.
Here's a demo. Some other plugins have been added to make events move off-screen and respawn cars, my thanks to Yanfly and Hime! Do not use the plugin inside the demo as it will never be updated, download from github.
Terms of Use
Free to use for commercial and non-commercial games. Credit Dahlys. I'd like a free copy if it's a commercial game, though.
Author Notes
This plugin was originally written on @Skurge 's request, without whom it wouldn't exist.