roadsConnectedTo: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{since" to "{{Since") |
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= | ||
| Find the road segments connected to the given road segment. | | Find the road segments connected to the given road segment. | ||
{{Important | Pedestrian roads such as <tt>"TRAIL"</tt>s are missing connection information by design, therefore basic command will return empty array for those. Use the alternative syntax to return pedestrian roads.}} |DESCRIPTION= | {{Important | Pedestrian roads such as <tt>"TRAIL"</tt>s are missing connection information by design, therefore basic command will return empty array for those. Use the alternative syntax to return pedestrian roads.}} |DESCRIPTION= | ||
| '''roadsConnectedTo''' roadSegment |SYNTAX= | | '''roadsConnectedTo''' roadSegment |SYNTAX= | ||
Line 32: | Line 29: | ||
|x2= <code>_road = ([[player]] [[nearRoads]] 50) [[select]] 0; | |x2= <code>_road = ([[player]] [[nearRoads]] 50) [[select]] 0; | ||
_connectedRoadsIncPedestrian = [[roadsConnectedTo]] [_road, [[true]]];</code> |EXAMPLE2= | _connectedRoadsIncPedestrian = [[roadsConnectedTo]] [_road, [[true]]];</code> |EXAMPLE2= | ||
| [[nearRoads]], [[isOnRoad]], [[roadAt]], [[surfaceIsWater]], [[getRoadInfo]], [[nearestTerrainObjects]] |SEEALSO= | | [[nearRoads]], [[isOnRoad]], [[roadAt]], [[surfaceIsWater]], [[getRoadInfo]], [[nearestTerrainObjects]] |SEEALSO= |
Revision as of 02:14, 17 January 2021
Description
- Description:
- Find the road segments connected to the given road segment.
- Groups:
- Roads and Airports
Syntax
- Syntax:
- roadsConnectedTo roadSegment
- Parameters:
- roadSegment: Object - road segment
- Return Value:
- Array of Objects - connected road segments
Alternative Syntax
- Syntax:
- roadsConnectedTo [roadSegment, extended] Template:Since
- Parameters:
- roadSegment: Object - road segment
- extended: Boolean - (Optional, default false) when true, performs a more thorough search on top of base behaviour, slower but returns pedestrian and other missing road segments
- Return Value:
- Array of Objects - connected road segments
Examples
- Example 1:
_road = (player nearRoads 50) select 0; _connectedRoads = roadsConnectedTo _road;
- Example 2:
_road = (player nearRoads 50) select 0; _connectedRoadsIncPedestrian = roadsConnectedTo [_road, true];
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