getRoute (Transporter)

Syntax

<MU-Path>.getRoute → object[]

The method getRoute returns the route of the Transporter designated by <MU-path> to its destination.

For Transporters, which are not bound to a fixed route network, the method returns the route to the last Marker of this route.

Return Value

The return value is an array of the data type object that contains the objects along the route.

Example

var route := .MUs.Transporter:1.getRoute
if isObject(route[1]) 
   print "First object: ", route[1].name
else
   print "First object is a two-lane track: ", route.asAny(1).~.name
end
print "The length is: ", route[1].length

Related Topics

setRoute

Route to Destination

Destination

HasRouteToDestination

asAny