LINK LIMB This command will link a newly created limb to a limb within an existing 3D object.
Syntax
    LINK LIMB Object Number, Limb Parent, Limb Child
Parameters
    Object Number
Integer The object number
    Limb Parent
Integer The limb number we will link to
    Limb Child
Integer The newly created limb number
Returns
This command does not return a value.
Description
When a limb is connected to another, it becomes a child limb that will be affected by the position, rotation and scale of its parent limbs. The parameters should be specified using integer values. When you ADD LIMB, all limb index values are re-ordered to reflect the new hierarchy, so old limb numbers will not be the same as they where before the LINK LIMB command.
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