A guide on making vehicles compatible with the AZC chase system.
Introduction
Structure overview
As with any spawnable object, it’s an instance, but the contents need to be structured carefully.
The main focus is the “chaseOperator.lua” script. This script contains all the inner workings of the vehicle, and can be examined when you create a local copy of the base pack mod. (its in the scripts folder)
The script has three children, the vehicle itself which has the “chasecar” tag, a body which contains the lights, and a communicator body which is empty and also has the “chasecar” tag.
If you want to know how the lights work, I’d recommend checking the mod out yourself, its pretty self explanatory. This body is also not required, as not all cars have emergency lights.
The vehicle is unchanged from any other non chase vehicle, and the communicator is just and empty body. That’s a pretty simple structure!
How to convert a vehicle
All you need to do next is turn the script (which contains the vehicle and communicator body) into something spawnable, for which there are loads of guides online. And tadaa, a vehicle that’s compatible with the AZC Chase Controller!
Other important stuff
The way the vehicle knows to halt or chase is the tag “lightson” on the communicator body. If the tag “lightson” is “1” then the vehicle will chase, if it’s “0” then it will brake and wait. (you can see how the controller changes this if you make a local copy)
You can change how frequently a light flashes by changing the value of the “blink” tag of a light in the lights body. The chaseOperator script will also automatically vary the start time of multiple lights to make them flash correctly.
The sirens can be modified too, and the vehicles automatically switch between two sirens on random intervals.
Thanks to Artzert for his great guide, all credit to his effort. you can also read the original guide from Steam Community. enjoy the game.
Related Posts:
- Teardown: All Forms of Modding Guide
- Teardown: Bare Bones Achievement Guide
- Teardown: How to create Custom Maps
- Teardown: “The GPS devices” Mission Guide (All goals walkthrough)
- Teardown: Remove TuxedoLabs Logo and Warning (Working 2021)