Arma 3 Scripting

isOnRoad

  • Global argument
  • Arma 3 v0.50
  • First in Arma 2 v1.00

Command · Markdown · JSON · original wiki page

Description

Checks if given position is inside road segment. Same as roadAt, only return is boolean instead of road object.

Syntax

isOnRoad position

Parameters:

Returns: Boolean

Examples

Example 1

_objOnRoad = isOnRoad player;

Example 2

_posOnRoad = isOnRoad ASLToAGL getPosASL player;

See also

nearRoads · roadsConnectedTo · roadAt · surfaceIsWater · getRoadInfo · nearestTerrainObjects

Community notes

Tankbuster

Some roadobjects will return false when using this command. invisibleroadway_square_f.p3d is found by the nearRoads command, yet will return false for isOnRoad.