3D Lingo Dictionary > E-K > ilk |  |

ilk

Syntax

    ilk(object)
    ilk(object,type)
    object.ilk
    object.ilk(type)

Description

Lingo function; indicates the type of an object.

| The syntax `ilk(``object``)` and `object``.ilk` return a value indicating the type of object. If the object is a model, `ilk(``object``)` returns `#model`; if the object is a motion, `ilk(``object``)` returns `#motion`. See the following table for a complete list of values returned by 3D objects.
| The syntax `ilk(``object``,` `type``)` and `object``.ilk(``type``)` compare the object represented by the object to the specified type. If the object is of the specified type, the `ilk()` function returns `TRUE`. It the object is not of the specified type, the `ilk()` function returns `FALSE`.

The following table shows the return value for each type of 3D object recognized by `ilk()`. See the main Lingo Dictionary for a list of return values of non-3D objects which are not discussed in this dictionary.

Type of object | ilk(object) returns | ilk(object, Type) if only Type =
--- | --- | ---
render services | #renderer | #renderer
model resource | #modelresource, #plane, #box, #sphere, #cylinder, #particle, #mesh | Same as ilk(object), except for #modelresource which is the ilk of resources generated by an imported W3D file
model | #model | #model
motion | #motion | #motion or #list
shader | #shader | #shader or #list
texture | #texture | #texture or #list
group | #group | #group
camera | #camera | #camera
collision data | #collisiondata | #collisiondata
vector | #vector | #vector
transform | #transform | #transform

Examples

This statement shows that MyObject is a motion object.

    put MyObject.ilk
    -- #motion

This statement tests whether MyObject is a motion object. The return value of 1 shows that it is.

    put MyObject.ilk(#motion)
    -- 1

See also

`tweenMode`