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.
Syntax
Section titled “Syntax”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) |
Returns
Section titled “Returns”boolean - false for no such prop or a bad value
Example
Section titled “Example”-- the lantern moves to the other sideSetCartProp(cart, lantern, "objects/manmade/common_illumination/lantern_fancy_a_hanging.cgf", -0.6, 1.1, 1.6)See also
Section titled “See also”AddCartProp · RemoveCartProp · the Carts group of the index
