ADD LIMB This command will create a new limb from a specified mesh and add it to an existing 3D object.
Syntax
    ADD LIMB Object Number, Limb Number, Mesh Number
Parameters
    Object Number
Integer The object number
    Limb Number
Integer Limb number
    Mesh Number
Integer Mesh number
Returns
This command does not return a value.
Description
Limbs can only be added sequentially, so you must ensure you specify a new limb number that immediately follows an existing limb. The parameters should be specified using integer values. When a limb is added to a 3D object, it will not have a place in the object hierarchy. You can position the limb in the object hierarchy using the LINK LIMB command. Do not confuse LINK LIMB with OFFSET LIMB which sets the actual 3D position of the limb within the object.
Example Code
    sync on : sync rate 0 : hide mouse:cls 0

    MeshNumber=1

    LimbNumber=1

    ObjectNumber=1

    load mesh "mesh.x",MeshNumber

    make object sphere ObjectNumber,10

    color object ObjectNumber,rgb(0,255,0)

    add limb ObjectNumber,LimbNumber,MeshNumber

    link limb ObjectNumber,0,LimbNumber

    offset limb ObjectNumber,1,8,0,0

    while mouseclick()=0:yrotate object ObjectNumber,wrapvalue(object angle y(ObjectNumber)+1):sync:endwhile

    delete mesh MeshNumber

    delete object ObjectNumber

    end
See also
BASIC3D Commands Menu Index