nearRoads: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - " +\]" to "]") |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 21: | Line 21: | ||
|s1= pos [[nearRoads]] radius | |s1= pos [[nearRoads]] radius | ||
|p1= pos: [[Object]] or [[Array]] in format [[Position#PositionAGL|PositionAGL]] or [[Position#Introduction|Position2D]] | |p1= pos: [[Object]] or [[Array]] in format [[Position#PositionAGL|PositionAGL]] or [[Position#Introduction|Position2D]] - center of search radius | ||
|p2= radius: [[Number]] - search radius in meters | |p2= radius: [[Number]] - search radius in meters | ||
Line 27: | Line 27: | ||
|r1= [[Array]] of [[Object]]s - road segments within radius | |r1= [[Array]] of [[Object]]s - road segments within radius | ||
|x1= < | |x1= <sqf>_list = player nearRoads 50;</sqf> | ||
|x2= < | |x2= <sqf>_list = (position _unit) nearRoads 50;</sqf> | ||
|x3= < | |x3= <sqf>_list = [1800,5700] nearRoads 50;</sqf> | ||
|seealso= [[isOnRoad]] [[roadAt]] [[surfaceIsWater]] [[roadsConnectedTo]] [[findNearestEnemy]] [[nearestBuilding]] [[nearestObject]] [[nearestObjects]] [[nearObjects]] [[nearestLocation]] [[nearEntities]] [[nearTargets]] [[nearSupplies]] [[nearestLocationWithDubbing]] [[nearObjectsReady]] [[getRoadInfo]] [[nearestTerrainObjects]] [[nearestMines]] | |seealso= [[isOnRoad]] [[roadAt]] [[surfaceIsWater]] [[roadsConnectedTo]] [[findNearestEnemy]] [[nearestBuilding]] [[nearestObject]] [[nearestObjects]] [[nearObjects]] [[nearestLocation]] [[nearEntities]] [[nearTargets]] [[nearSupplies]] [[nearestLocationWithDubbing]] [[nearObjectsReady]] [[getRoadInfo]] [[nearestTerrainObjects]] [[nearestMines]] | ||
Line 40: | Line 40: | ||
<dt></dt> | <dt></dt> | ||
<dd class="notedate">Posted on 26 Mar, 2011</dd> | <dd class="notedate">Posted on 26 Mar, 2011</dd> | ||
<dt class="note">[[User:Tankbuster|Tankbuster ]]</dt> | <dt class="note">[[User:Tankbuster|Tankbuster]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
NearRoads always gets data in the same order. In a 300 meter radius around Feruz Abad, for example, the first one is in the south-west corner and the last one is in the north-east. | NearRoads always gets data in the same order. In a 300 meter radius around Feruz Abad, for example, the first one is in the south-west corner and the last one is in the north-east. | ||
</dl> | </dl> |
Latest revision as of 18:15, 8 November 2023
Description
- Description:
- Find the road segments within the circle of given radius.
- Groups:
- Roads and AirportsObject Detection
Syntax
- Syntax:
- pos nearRoads radius
- Parameters:
- pos: Object or Array in format PositionAGL or Position2D - center of search radius
- radius: Number - search radius in meters
- Return Value:
- Array of Objects - road segments within radius
Examples
- Example 1:
- Example 2:
- Example 3:
Additional Information
- See also:
- isOnRoad roadAt surfaceIsWater roadsConnectedTo findNearestEnemy nearestBuilding nearestObject nearestObjects nearObjects nearestLocation nearEntities nearTargets nearSupplies nearestLocationWithDubbing nearObjectsReady getRoadInfo nearestTerrainObjects nearestMines
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
- Posted on 26 Mar, 2011
- Tankbuster
- NearRoads always gets data in the same order. In a 300 meter radius around Feruz Abad, for example, the first one is in the south-west corner and the last one is in the north-east.