roadAt: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 39: Line 39:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on December 30, 2016 - 21:40 (UTC)</dd>
<dt class="note">[[User:OOKexOo|OOKexOo]]</dt>
<dd class="note">
This command does not nessecarly return the closest road to the given position.<br>
In order to get the closest road use [[nearRoads]].<br>
<code>_closest_road &#61; (_pos nearRoads 0.1) select 0;</code>
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 22:40, 30 December 2016

-wrong parameter ("A3") defined!-[[:Category:Introduced with A3 version 1.58|1.58]]
Hover & click on the images for description

Description

Description:
Returns road segment at given position, objNull otherwise. Same as isOnRoad only returns the actual road object instead of boolean.
Groups:
Uncategorised

Syntax

Syntax:
roadAt position
Parameters:
position: Object or Array in format PositionAGL (especially on bridges)
Return Value:
Object - road segment or objNull

Examples

Example 1:
_road = roadAt ASLToAGL getPosASL player;
Example 2:
_isOnRoad = !isNull roadAt player;

Additional Information

See also:
nearRoadsroadsConnectedToisOnRoadsurfaceIsWater

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

[[Category:Introduced with A3 version 1.58]][[ Category: A3: New Scripting Commands | ROADAT]][[ Category: A3: Scripting Commands | ROADAT]]

Notes

Bottom Section

Posted on December 30, 2016 - 21:40 (UTC)
OOKexOo
This command does not nessecarly return the closest road to the given position.
In order to get the closest road use nearRoads.
_closest_road = (_pos nearRoads 0.1) select 0;