isOnRoad: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma2 | | arma2 | ||
|1.00 | |1.00 | ||
|arg= global | |arg= global | ||
|gr1= Roads and Airports | |gr1= Roads and Airports | ||
| Checks if given position is inside road segment. Same as [[roadAt]], only return is boolean instead of road object. | | Checks if given position is inside road segment. Same as [[roadAt]], only return is boolean instead of road object. | ||
| '''isOnRoad''' position | | '''isOnRoad''' position | ||
|p1= 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 | |p1= 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 | ||
| [[Boolean]] | | [[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> | ||
|[[nearRoads]], [[roadsConnectedTo]], [[roadAt]], [[surfaceIsWater]], [[getRoadInfo]], [[nearestTerrainObjects]] | |[[nearRoads]], [[roadsConnectedTo]], [[roadAt]], [[surfaceIsWater]], [[getRoadInfo]], [[nearestTerrainObjects]] | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= |
Revision as of 00:42, 18 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.