nearRoads: Difference between revisions
Jump to navigation
Jump to search
m (Text replace - "{{uc:{{PAGENAME}}}}" to "{{uc:{{PAGENAME}}}} {{uc:{{PAGENAME}}}}") |
(MP argument, formatting, added examples/see also, formatting note) |
||
Line 5: | Line 5: | ||
|1.00|= Game version | |1.00|= Game version | ||
|arg= global|= Arguments in MP | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 12: | Line 14: | ||
| pos '''nearRoads''' radius |= Syntax | | pos '''nearRoads''' radius |= Syntax | ||
|p1= pos: [[ | |p1= pos: [[Object]] or [[Array]] - format [[Position]], center of search radius |= PARAMETER1 | ||
|p2= radius: [[Number]] - | |p2= radius: [[Number]] - search radius in meters |= PARAMETER2 | ||
|p3= |= PARAMETER3 | |p3= |= PARAMETER3 | ||
| [[Array]] |= RETURNVALUE | | [[Array]] of [[Object]]s - road segments within radius|= RETURNVALUE | ||
|x1= <code>_list = [[player]] [[nearRoads]] 50;</code>|= EXAMPLE1 | |||
|x2= <code>_list = ([[position]] _unit) [[nearRoads]] 50;</code>|= EXAMPLE2 | |||
| | |x3= <code>_list = [1800,5700] [[nearRoads]] 50;</code>|= EXAMPLE3 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[ | | [[isOnRoad]], [[roadsConnectedTo]] |= SEEALSO | ||
| |= MPBEHAVIOUR | | |= MPBEHAVIOUR | ||
Line 34: | Line 40: | ||
<dl class='command_description'> | <dl class='command_description'> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on 26 Mar, 2011 | |||
<dt class="note">'''[[User:Tankbuster|Tankbuster ]]'''<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. | ||
Revision as of 13:35, 20 April 2014
Description
- Description:
- Find the road segments within the circle of given radius.
- Groups:
- Uncategorised
Syntax
- Syntax:
- pos nearRoads radius
- Parameters:
- pos: Object or Array - format Position, center of search radius
- radius: Number - search radius in meters
- Return Value:
- Array of Objects - road segments within radius
Examples
- Example 1:
_list = player nearRoads 50;
- Example 2:
_list = (position _unit) nearRoads 50;
- Example 3:
_list = [1800,5700] nearRoads 50;
Additional Information
- See also:
- isOnRoadroadsConnectedTo
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
- 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. Click below for picture. [1]