isOnRoad: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "Category:Scripting Commands ArmA2" to "Category:Scripting Commands Arma 2")
m (Text replacement - "[[Category:Scripting_Commands_Take_On_Helicopters" to "[[Category:Scripting Commands Take On Helicopters")
Line 39: Line 39:
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]



Revision as of 14:12, 6 April 2020

Hover & click on the images for description

Description

Description:
Checks if given position is on road. Same as roadAt, only return is boolean instead of road object.
Groups:
Uncategorised

Syntax

Syntax:
isOnRoad position
Parameters:
position: Object or Array in format PositionAGL (especially on bridges)
Return Value:
Boolean

Examples

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

Additional Information

See also:
nearRoadsroadsConnectedToroadAtsurfaceIsWater

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

Notes

Bottom Section

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.