isOnRoad: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| arma2 |Game name= | | arma2 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Roads and Airports |GROUP1= | |gr1= Roads and Airports |GROUP1= | ||
| Checks if given position is inside road segment. Same as [[roadAt]], only return is boolean instead of road object. |DESCRIPTION= | | Checks if given position is inside road segment. Same as [[roadAt]], only return is boolean instead of road object. |DESCRIPTION= | ||
| '''isOnRoad''' position|SYNTAX= | | '''isOnRoad''' position|SYNTAX= | ||
Line 22: | Line 19: | ||
|x2= <code>_posOnRoad = [[isOnRoad]] [[ASLToAGL]] [[getPosASL]] [[player]];</code>|EXAMPLE2= | |x2= <code>_posOnRoad = [[isOnRoad]] [[ASLToAGL]] [[getPosASL]] [[player]];</code>|EXAMPLE2= | ||
|[[nearRoads]], [[roadsConnectedTo]], [[roadAt]], [[surfaceIsWater]], [[getRoadInfo]], [[nearestTerrainObjects]] |SEEALSO= | |[[nearRoads]], [[roadsConnectedTo]], [[roadAt]], [[surfaceIsWater]], [[getRoadInfo]], [[nearestTerrainObjects]] |SEEALSO= | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= | ||
}} | }} | ||
Revision as of 01:42, 17 January 2021
Description
- Description:
- Checks if given position is inside road segment. Same as roadAt, only return is boolean instead of road object.
- Groups:
- Roads and Airports
Syntax
- Syntax:
- isOnRoad position
- Parameters:
- position: Object or Array in format PositionAGL (especially on bridges) or (since Arma 3 v1.99.146460) Position2D, in which case Z will be automatically deduced as the height of the road surface
- Return Value:
- Boolean
Examples
Additional Information
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.