getRoadInfo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \{\{GameCategory *\| *arma3 *\| *(New )?Scripting Commands\}\}" to "")
m (Text replacement - " \|p([0-9]{1,2})=([^ ]+) + \| *(\[\[Arr.+) * " to " |p$1=$2 |r1=$3 ")
Line 15: Line 15:
|p1= road: [[Object]]
|p1= road: [[Object]]


| [[Array]] in format [mapType, width, isPedestrian, texture, textureEnd, material, begPos, endPos, isBridge], where:
|r1=[[Array]] in format [mapType, width, isPedestrian, texture, textureEnd, material, begPos, endPos, isBridge], where:
* mapType: [[String]] - road segment type, could be <tt>"ROAD"</tt>, <tt>"MAIN ROAD"</tt>, <tt>"TRACK"</tt>, <tt>"TRAIL"</tt> (see [[nearestTerrainObjects]])
* mapType: [[String]] - road segment type, could be <tt>"ROAD"</tt>, <tt>"MAIN ROAD"</tt>, <tt>"TRACK"</tt>, <tt>"TRAIL"</tt> (see [[nearestTerrainObjects]])
* width: [[Number]] - road segment width
* width: [[Number]] - road segment width

Revision as of 04:00, 13 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Roads and Airports

Syntax

Syntax:
getRoadInfo road
Parameters:
road: Object
Return Value:
Array in format [mapType, width, isPedestrian, texture, textureEnd, material, begPos, endPos, isBridge], where:
  • mapType: String - road segment type, could be "ROAD", "MAIN ROAD", "TRACK", "TRAIL" (see nearestTerrainObjects)
  • width: Number - road segment width
  • isPedestrian: Boolean - when true road is for pedestrian use only
  • texture: String - road segment surface texture
  • textureEnd: String - road segment surface texture
  • material: String - road segment surface material
  • begPos: PositionASL - start of the road segment
  • endPos: PositionASL - finish of the road segment
  • isBridge: Boolean - when true road segment is a bridge

Examples

Example 1:
getRoadInfo _road
Example 2:
Get direction of the road segment:private _info = getRoadInfo _road; private _dir = (_info select 6) getDir (_info select 7);

Additional Information

See also:
nearRoads roadsConnectedTo isOnRoad roadAt nearestTerrainObjects

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