MAKE OBJECT FROM LIMB This command will make a simple object from the specified limb.
Syntax
    MAKE OBJECT FROM LIMB Object Number, Second Object, Limb Number
    MAKE OBJECT FROM LIMB Object Number, Second Object, Limb Number, All Limbs Flag
Parameters
    Object Number
Integer The new object number
    Second Object
Integer The object we will get the limb from
    Limb Number
Integer The limb number
    All Limbs Flag
Integer An optional parameter of zero will copy just a single limb from the object, whereas a value of one will copy the limb, its orientation data and all limbs linked that limb as well
Returns
This command does not return a value.
Description
You can use this command to remove a limb element such as an arm or gun from an object and create a new object using just this element. Ideal for deconstructing loaded models and using their elements for other uses. An optional parameter of zero will copy just a single limb from the object, whereas a value of one will copy the limb, its orientation data and all limbs linked that limb as well. It is important to note than when you extract a limb from an object, any shared scaling or rotating from the parent frames will be lost, and you will have the pure frame, without any shared influences.
Example Code
    sync on : sync rate 0 : hide mouse:cls 0

    autocam off

    ObjectNumber=1

    SecondObject=2

    ThirdObject=3

    limbnumber=5

    load image "iron.jpg",1

    load object "model.x",ObjectNumber

    point object ObjectNumber,0,0,0

    position object ObjectNumber, 0,0,0

    texture object ObjectNumber,1

    make object sphere SecondObject,1

    point object SecondObject,0,0,0

    position object SecondObject, 0,0,0

    position camera 0,0,5

    point camera 0,0,0

    if limb exist(ObjectNumber,limbnumber)=1

    color limb ObjectNumber,limbnumber,rgb(0,255,0)

    make object from limb ThirdObject,ObjectNumber,limbnumber,1

    position object ThirdObject,3,0,0

    endif

    while mouseclick()=0

    sync

    endwhile

    delete object ObjectNumber

    delete object SecondObject

    delete object ThirdObject

    end
See also
BASIC3D Commands Menu Index