Skip to content

OnCartStop

A route’s cart pulled up at one of its stops and waits there.

stop is the stop’s name from the route ("" for one without). The cart waits the stop’s wait seconds, longer while someone climbs in or out, or as long as HoldCart says.

function OnCartStop(id, route, stop)
-- ...
end
Parameter Type
id number the cart
route string the route’s name
stop string the stop’s name

nothing

-- the passengers hear where they are
function OnCartStop(id, route, stop)
for _, pid in ipairs(GetCartPassengers(id)) do
GameText(pid, stop, 3000)
end
end

AddCartRoute · HoldCart · GetCartPassengers · the Carts group of the index