isOnRoad: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|( *\[\[[a-zA-Z]+\]\]) * \|x1=" to "\|r1=$1 \|x1=")
m (Text replacement - "\|" to "|")
Line 13: Line 13:
|p1= position: [[Object]] or [[Array]] in format [[PositionAGL]] (especially on bridges) or (since Arma 3 v2.00) [[Position2D]], in which case Z will be automatically deduced as the height of the road surface
|p1= position: [[Object]] or [[Array]] in format [[PositionAGL]] (especially on bridges) or (since Arma 3 v2.00) [[Position2D]], in which case Z will be automatically deduced as the height of the road surface


\|r1= [[Boolean]]
|r1= [[Boolean]]


\|x1= <code>_objOnRoad = [[isOnRoad]] [[player]];</code>
|x1= <code>_objOnRoad = [[isOnRoad]] [[player]];</code>


|x2= <code>_posOnRoad = [[isOnRoad]] [[ASLToAGL]] [[getPosASL]] [[player]];</code>
|x2= <code>_posOnRoad = [[isOnRoad]] [[ASLToAGL]] [[getPosASL]] [[player]];</code>

Revision as of 11:30, 10 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Roads and Airports

Syntax

Syntax:
Syntax needed
Parameters:
position: Object or Array in format PositionAGL (especially on bridges) or (since Arma 3 v2.00) Position2D, in which case Z will be automatically deduced as the height of the road surface
Return Value:
Boolean

Examples

Example 1:
_objOnRoad = isOnRoad player;
Example 2:
_posOnRoad = isOnRoad ASLToAGL getPosASL player;

Additional Information

See also:
nearRoadsroadsConnectedToroadAtsurfaceIsWatergetRoadInfonearestTerrainObjects

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on November 24, 2017 - 21:31 (UTC)
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.