Cart
A wagon or cart from the game's blueprints, spawned with horses in harness, for players to ride. The server stores the blueprint, location, who sits where and the top speed, and the driver's game does the driving. A seated player's body faces the seat's direction and turns with the cart, while looking around turns only the head and view.
cart.spawn()
Cart.spawn(blueprint, position, orientation, dimension)Spawns a cart. Throws for an unknown blueprint.
cart.all()
Cart.all(dimension)All carts, or those in one dimension.
cart.getById()
Cart.getById(id)The cart with this network id, or null.
cart.destroyAll()
Cart.destroyAll(dimension)Removes all carts, or those in one dimension, after letting riders off, and returns how many.
cart.blueprints()
Cart.blueprints()The blueprints with their horse counts and seats.
cart.horseCount
horseCountThe number of horses pulling it.
cart.seats
seatsThe names of its seats.
cart.driverWalks
driverWalksWhether the driver walks beside the horses, as with a c wagon or a cart, rather than sitting at the front.
cart.driver
driverThe player in the driver's seat, or null.
cart.pace
paceIts current movement: 'stand', 'walk', 'trot' or 'reverse'.
cart.position
positionIts location.
cart.rotation
rotationIts rotation.
cart.maxSpeed
maxSpeedThe driver's top speed, 0 to 15, default 7. Values outside that are ignored.
cart.load
loadWhat the cart visibly carries: one of `loads`, or '' for nothing. Anything else throws.
cart.loads
loadsThe loads this blueprint can carry: goods, goods2 and sacks for cart_b; shadyGoods, shadyGoods2 and branches for cart_a; none for others.
cart.storage
storageThe cart's storage, or null.
cart.addStorage()
addStorage()Gives the cart a storage and returns it as a Stash. Calling it again returns the same one. Players search it with the game's prompt at the cart.
cart.removeStorage()
removeStorage()Removes the cart's storage and its contents.
cart.seatPlayer()
seatPlayer(player, seat)Seats a player, taking them off any other cart. Returns false if refused, and throws for an unknown seat.
cart.unseatPlayer()
unseatPlayer(player)Lets a player off.
cart.whoSits()
whoSits(seat)Who sits in a seat, or null.
cart.seatOf()
seatOf(player)A player's seat, or null.
cart.teleport()
teleport(position, orientation)Moves the cart with everyone on it.
cart.destroy()
destroy()Removes the cart, firing cartDestroy, after letting everyone off.
cart.id
id: numberThe network id.
cart.blueprint
blueprint: stringThe blueprint it was spawned from.
cart.dimension
dimension: numberIts dimension.