MAKE OBJECT This command will construct a 3D object from a single mesh and image.
Syntax
    MAKE OBJECT Object Number, Mesh Index, Image Number
Parameters
    Object Number
Integer The object number
    Mesh Index
Integer The mesh number we will use to build new object
    Image Number
Integer The texture number for the new object
Returns
This command does not return a value.
Description
The mesh is used as the root limb for the 3D object and the image is used as a texture for the object. You do not have to specify an image value, but such models will appear white when displayed. The parameters should be specified using integer values.
Example Code
    sync on

    sync rate 120

    hide mouse

    cls 0

    ObjectNumber=1

    MeshNumber=1

    LimbNumber=0

    TextureNumber=1

    load mesh "mesh.x",MeshNumber

    load mesh "newmesh.x",MeshNumber+1

    load image "iron.jpg",TextureNumber

    make object ObjectNumber, MeshNumber,TextureNumber

    if mesh exist(MeshNumber)=1 then delete mesh MeshNumber

    make mesh from object MeshNumber, ObjectNumber

    add limb ObjectNumber,LimbNumber+1,MeshNumber

    link limb ObjectNumber,0,LimbNumber+1

    offset limb ObjectNumber,1,1,0,0

    color limb ObjectNumber,LimbNumber+1,rgb(0,255,0)

    scale limb ObjectNumber,LimbNumber+1,50,50,50

    while mouseclick()=0

    set cursor 0,0

    print "press z key"

    if inkey$()="z" then change mesh ObjectNumber, LimbNumber+1, MeshNumber+1

    xrotate object ObjectNumber,wrapvalue(object angle x(ObjectNumber)+1)

    sync

    endwhile

    delete object ObjectNumber

    if mesh exist(MeshNumber)=1 then delete mesh MeshNumber

    if mesh exist(MeshNumber+1)=1 then delete mesh MeshNumber+1

    end
See also
BASIC3D Commands Menu Index