GE / gameplay_traffic
API gameplay_traffic
Children
Functions
function activate(vehList, ignoreFilter) -- activates traffic mode, and adds specified vehicles to the traffic table
function deactivate(stopAi) -- deactivates traffic mode for all vehicles
function deleteVehicles() -- deletes all traffic vehicles
function forceTeleport(id, pos, dir, minDist, maxDist, targetDist) -- force teleports a traffic vehicle
function scatterTraffic(vehIds, minDist, maxDist) -- teleports a group of vehicles away from the current place
function freezeState() -- stops the traffic, police, and parking systems, and returns the state data
function getFocus() -- returns the focus point
function getIdealSpawnAmount(amount, ignoreAdjust) -- gets the ideal amount of vehicles to spawn based on current world state
function getTrafficAmount(activeOnly) -- returns current amount of AI traffic (optionally only active vehicles)
function getState() -- returns traffic system state
function getTrafficData() -- returns the full traffic table
function getTrafficList() -- returns traffic list of ids
function getTrafficAmount(activeOnly) -- returns current amount of AI traffic (optionally only active vehicles)
function getTrafficData() -- returns the full traffic table
function getTrafficList() -- returns traffic list of ids
function getTrafficPool()
function getTrafficVars()
function insertTraffic(id, ignoreAi, ignoreVehPool) -- inserts a new vehicle into the traffic table
function onClientEndMission()
function onClientStartMission()
function onDeserialized(data)
function onPreRender(dt)
function onSerialize()
function onTrafficStarted()
function onTrafficStopped()
function onUiWaitingState() -- callback for when the waiting UI is shown
function onUpdate(dtReal, dtSim)
function onVehicleActiveChanged(vehId, active)
function onVehicleDestroyed(id)
function onVehicleGroupSpawned(vehList, groupId, groupName)
function onVehicleMapmgrUpdate(id) -- when the latest spawned vehicle processes its mapmgr, complete the spawning process
function onVehicleResetted(id)
function onVehicleSpawned(id)
function onVehicleSwitched(oldId, newId)
function refreshVehicles() -- resets core traffic vehicle data
function removeTraffic(id, stopAi) -- remove a vehicle from the traffic table
function scatterTraffic(vehIds, minDist, maxDist) -- teleports a group of vehicles away from the current place
function setActiveAmount(amount) -- sets the maximum amount of active (visible) vehicles
function setDebugMode(value) -- sets the module debug mode
function setFocus(mode, data) -- sets the focus point to use for checking and respawning traffic
function setTrafficVars(data, reset) -- sets various traffic variables
function setupCustomTraffic(amount, params) -- spawns a group of vehicles for traffic, with custom parameters
function setupTraffic(amount, policeRatio, options) -- prepares a group of vehicles for traffic
function setupTrafficWaitForUi(usePolice) -- this is called from the radial menu and displays a loading screen
function spawnTraffic(amount, groupData, options) -- spawns and processes a group array of vehicles to use as traffic
function toggle(keepInMemory)
function trackAIAllVeh(mode) -- triggers when the player sets an AI mode for all vehicles
function unfreezeState(trafficData, policeData, parkingData) -- reverts the traffic and parking systems