๐ŸŽ› ULC
Park Patterns & Sync

Park Patterns & Sync

Overview

Park patterns allow you to automatically enable or disable extras based on the speed of the vehicle. The effect will activate after a short delay when the vehicle is stopped.

The feature is intended for use with park patterns; enabling a park pattern stage extra when the vehicle comes to a full stop. However, you can specify the speed threshold to enable the extras when the vehicle is going below a certain speed if you want to.

You can also choose to sync park patterns with other nearby vehicles.

Real World Example

How to Create a Park Pattern

To create a functional park pattern, create a stage extra that has a much slower pattern than your main lighting. If needed, be sure to create divider meshes to hide the underneath pattern.

Then configure your vehicle to enable that extra. You can also choose to disable another extra when parked. These extras will switch between each other based on whether the vehicle is parked or driving automatically.

Global Settings

These settings are found in the config.lua file under ParkSettings and affect all vehicles on the server that use ULC.

speedThreshold

When the vehicle's speed is below this value, park pattern effects will be enabled. This value is in MPH unless you set useKPH = true in the global settings (opens in a new tab).

speedThreshold = 4,

delay

The delay in seconds between checks for whether the vehicle is stopped or not. This should not be any lower than 0.5 seconds. Higher values may look more realistic. Default value is 0.5 seconds.

delay = 0.5,

syncDistance

The distance in meters to check for other vehicles to sync park patterns with. Default value is 32 meters.

syncDistance = 32,

syncCooldown

The time in seconds before a single client is able to trigger sync again. Default value is 10 seconds.

syncCooldown = 10,

Vehicle Settings

These settings are found in ulc.lua and only effect the specified vehicle(s).

parkConfig = {
    -- whether to use park pattern or not
    -- accepts: boolean
    usePark = true
 
    -- whether to use park pattern syncing or not
    -- accepts: boolean
    useSync = true
 
    -- vehicles that this vehicle with sync with
    -- you do not need to include the vehicle itself
    -- if your config is for more than one vehicle include all of them here
    -- accepts: table of vehicle spawn names
    syncWith = {'police', 'police2'}
 
    -- extras that will be enabled when the vehicle comes to a stop
    -- accepts: table of integers
    pExtras = {1, 3}
 
    -- extras that will be disabled when the vehicle comes to a stop
    -- accepts: table of integers
    dExtras = {9}
}