Skip to content

SetCartProp

Changes a prop of a cart in place - another model, place, turn, scale or material.

The same numbers as AddCartProp; the prop keeps its id.

SetCartProp(id, prop, model, x, y, z [, pitch, roll, yaw, scale, material])
Parameter Type
id number the cart
prop number the prop’s id
model string the mesh
x number metres to the body’s right
y number metres ahead
z number metres up
pitch number degrees (optional)
roll number degrees (optional)
yaw number degrees (optional)
scale number nil = 1 (optional)
material string a .mtl path; nil = the model’s own (optional)

boolean - false for no such prop or a bad value

-- the lantern moves to the other side
SetCartProp(cart, lantern, "objects/manmade/common_illumination/lantern_fancy_a_hanging.cgf", -0.6, 1.1, 1.6)

AddCartProp · RemoveCartProp · the Carts group of the index