Skip to content

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.

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)

boolean - false when it is not a cart or there is no such route

local cart = CreateCart("wagon", 1250, 1093)
SetCartRoute(cart, "Monastery loop", 3)

GetCartRoute · AddCartRoute · CreateCart · the Carts group of the index