SetCartPart
Changes one part of a cart - its body, axle, wheels, load or a horse - on every screen at once.
The game builds all its wagons on one chassis, so any part goes with any other. slot and part on a "wagon":
| Slot | Parts |
|---|---|
body |
a (the default), b (boards lying in its bed), b_plain (the same, empty), c (long, with ladder sides); a_covered, b_covered, c_covered - under a canvas cover |
axle |
b (the default), b_covered - the front axle with the pole |
wheels |
b_covered (the default), b, polygonal |
load |
none (the default), sacks, charcoal, carpets, stones, hay_small, hay_medium, hay_large, goods, junk, cabbage |
horse1, horse2 |
the left and the right horse’s coat: black, bay_dun, chestnut, light_grey, buckskin, palomino, seal_brown, dark_grey, red_roan, brown |
On a two-wheeled "cart":
| Slot | Parts |
|---|---|
body |
b - the body with its shafts, the only one |
wheels |
b - the only one |
load |
none (the default), goods (barrels, a basket, sacks), market (baskets and a barrel), sacks, cabbage (wicker sides full of cabbages) |
horse1 |
the horse’s coat, the same as a wagon’s |
nil or "" gives the slot back its default (a horse its cart’s own coat). The change shows at once, while the cart
drives and with players in it too. A route’s carts take the route’s parts again when the route is replaced.
Syntax
Section titled “Syntax”SetCartPart(id, slot [, part])| Parameter | Type | |
|---|---|---|
id |
number | the cart |
slot |
string | "body", "axle", "wheels", "load", "horse1" or "horse2" |
part |
string | the part (any case); nil or "" = the default (optional) |
Returns
Section titled “Returns”boolean - false when it is not a cart, or the slot or the part is none of its kind’s
Example
Section titled “Example”-- the miller's cart: an old wagon, rough wheels, a full load of haySetCartPart(cart, "body", "c")SetCartPart(cart, "wheels", "polygonal")SetCartPart(cart, "load", "hay_large")See also
Section titled “See also”SetCartParts · GetCartPart · GetCartPartNames · CreateCart · the Carts group of the index
