Repository navigation
A3D_GetRouteTurnCount
imshooter edited this page Oct 23, 2026
·
1 revision
Number of turns of a route.
native A3D_GetRouteTurnCount(Route:routeid);| Parameter | Description |
|---|---|
Route:routeid |
Route to read. |
- The number of turns.
-
0when the route does not exist.
Only the turns at junctions count, where a driver chooses a way. A road that bends between junctions makes no turn. A route of a few kilometres has about ten.
stock PrintTurns(Route:routeid) {
new
Float:x,
Float:y,
Float:z,
Float:distance,
A3D_TURN:turn
;
for (new index, count = A3D_GetRouteTurnCount(routeid); index != count; ++index) {
turn = A3D_GetRouteTurn(routeid, index, x, y, z, distance);
printf("after %.0f metres, turn %i", distance, _:turn);
}
}- A3D_GetRouteTurn: Read a turn of a route, at a junction where more than two ways meet.
- A3D_GetRouteProgress: Find where a point is along a route: the distance left, the distance from the route and the next turn.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions