Skip to content

Route Types

imshooter edited this page Oct 23, 2026 · 1 revision

The type of A3D_FindRoute and the other route natives is an A3D_ROUTE, which tells which paths a route uses and how it weighs them.

Type Value Paths One way streets Best route
A3D_ROUTE_FASTEST 0 Every road Kept The least time
A3D_ROUTE_SHORTEST 1 Every road Kept The least distance
A3D_ROUTE_ANY_WAY 2 Every road Driven both ways The least time
A3D_ROUTE_TRAFFIC 3 The roads the traffic of the game drives Kept The least time
A3D_ROUTE_BOAT 4 The lanes for boats Sailed both ways The least time
A3D_ROUTE_WALK 5 The paths of pedestrians, and the roads where there are none Walked both ways The least time

Speeds

The time of a route, which A3D_GetRouteTime gives and the routes that weigh time compare, comes from these speeds:

Path Speed
Highway 36 metres a second, 130 km/h
Road the traffic drives 22 metres a second, 79 km/h
Road the traffic leaves alone 14 metres a second, 50 km/h
Lane for boats 15 metres a second, 54 km/h
On foot 5 metres a second, 18 km/h

A walk along a road weighs a quarter more than along a path for pedestrians, and along a highway two and a half times more, so walks keep to the paths where they can. The time still counts them at 5 metres a second.

Turns

The routes for vehicles also pay for their turns at junctions: two seconds to the right, five to the left and thirty to turn back. A3D_ROUTE_SHORTEST pays only for turning back, as 100 metres. Boats and walks turn at no cost. See Turns.

Choosing a type

  • A3D_ROUTE_FASTEST is what a player driving expects from a GPS.
  • A3D_ROUTE_SHORTEST suits a runner or a fare by distance, and takes small roads to save metres.
  • A3D_ROUTE_ANY_WAY suits the police, the ambulance and the fire brigade.
  • A3D_ROUTE_TRAFFIC suits vehicles driven by scripts, which should stay on the main roads.
  • A3D_ROUTE_BOAT keeps to the water, between the lanes the boats of the game sail.
  • A3D_ROUTE_WALK leads a player on foot, and with the navigation mesh from and to any point.

Home

Guides

Reference

Functions

Creating objects
Motion
Placement
Behaviour
Display and data
Rays
Shapes
Players, vehicles and actors
Map probes
Screen
Map objects
Water
Models and surfaces
Rotations and offsets
Vehicles
Routes
Route display
Walking
Callbacks

Clone this wiki locally