SetCartRoute
Puts a cart on a route, or takes it off (a free cart again).
On a route the cart joins it at the point startPoint (from 1; the first by default) and a wagoner takes the bench -
a player at its reins is put out of the seat first. nil takes it off: it stops where it is, a free cart without a
wagoner.
Syntax
Section titled “Syntax”SetCartRoute(id [, route, startPoint])| Parameter | Type | |
|---|---|---|
id |
number | the cart |
route |
string | the route’s name; nil = off any route (optional) |
startPoint |
number | the route’s point it joins at (from 1) (optional) |
Returns
Section titled “Returns”boolean - false when it is not a cart or there is no such route
Example
Section titled “Example”local cart = CreateCart("wagon", 1250, 1093)SetCartRoute(cart, "Monastery loop", 3)See also
Section titled “See also”GetCartRoute · AddCartRoute · CreateCart · the Carts group of the index
