Table Objects
Objects include moveables, statics, cameras, and others.
Every object accessible by script API must have unique name, disregarding its type.
Functions
| GetMoveableByName(name) | Get a Moveable by its name. |
| GetMoveablesBySlot(slot) | Get moveables by their slot. |
| GetStaticByName(name) | Get a Static by its name. |
| GetMaterialByName(name) | Get a Material by its Tomb Editor material name. |
| GetMaterialsByObject(object) | Get all materials referenced by a moveable or static object. |
| GetStaticsBySlot(slot) | Get statics by their slot. |
| GetCameraByName(name) | Get a Camera by its name. |
| GetSinkByName(name) | Get a Sink by its name. |
| GetSoundSourceByName(name) | Get a SoundSource by its name. |
| GetAIObjectByName(name) | Get an AIObject by its name. |
| GetVolumeByName(name) | Get a Volume by its name. |
| GetRoomByName(name) | Get a Room by its name. |
| GetRoomByNumber(name) | Get a Room by its number. |
| GetRoomsByTag(tag) | Get rooms by tag. |
| IsNameInUse(name) | Check if a given script name is in use by any object type. |
| GetSlotName(objectID) | Converts moveable Object ID to a string with internal slot name. |
| GetMoveableProperty(objectID, name) | Get a global property for a moveable object ID. |
| SetMoveableProperty(objectID, name, value) | Set a global property for a moveable object ID. |
| GetStaticProperty(slotID, name) | Get a global property for a static slot ID. |
| SetStaticProperty(slotID, name, value) | Set a global property for a static slot ID. |
Special objects
| Lara | An Objects.LaraObject entry representing Lara herself. |
Functions
- GetMoveableByName(name)
-
Get a Moveable by its name.
Parameters:
- name string The unique name of the moveable as set in, or generated by, Tomb Editor.
Returns:
-
Moveable
A non-owning Moveable referencing the item.
- GetMoveablesBySlot(slot)
-
Get moveables by their slot.
Parameters:
- slot ObjID The unique slot of the moveable, e.g. Objects.ObjID.ANIMATING1.
Returns:
-
table
Table of moveables referencing the given slot.
- GetStaticByName(name)
-
Get a Static by its name.
Parameters:
- name string The unique name of the static mesh as set in, or generated by, Tomb Editor.
Returns:
-
Static
A non-owning Static referencing the static mesh.
- GetMaterialByName(name)
-
Get a Material by its Tomb Editor material name.
Parameters:
- name string Material name.
Returns:
-
Material
A non-owning material wrapper.
- GetMaterialsByObject(object)
-
Get all materials referenced by a moveable or static object.
Parameters:
Returns:
-
table
Table of unique material wrappers referenced by the object's meshes and/or skin. Meshes that were hidden in the WadTool are not included.
- GetStaticsBySlot(slot)
-
Get statics by their slot.
Parameters:
- slot int The unique numerical slot of the static mesh.
Returns:
-
table
Table of static meshes referencing the given slot.
- GetCameraByName(name)
-
Get a Camera by its name.
Parameters:
- name string The unique name of the camera as set in, or generated by, Tomb Editor.
Returns:
-
Camera
A non-owning Camera referencing the camera.
- GetSinkByName(name)
-
Get a Sink by its name.
Parameters:
- name string The unique name of the sink as set in, or generated by, Tomb Editor.
Returns:
-
Sink
A non-owning Sink referencing the sink.
- GetSoundSourceByName(name)
-
Get a SoundSource by its name.
Parameters:
- name string The unique name of the sound source as set in, or generated by, Tomb Editor.
Returns:
-
SoundSource
A non-owning SoundSource referencing the sound source.
- GetAIObjectByName(name)
-
Get an AIObject by its name.
Parameters:
- name string The unique name of the AIObject as set in, or generated by, Tomb Editor.
Returns:
-
AIObject
A non-owning AIObject referencing the AI object.
- GetVolumeByName(name)
-
Get a Volume by its name.
Parameters:
- name string The unique name of the volume as set in, or generated by, Tomb Editor.
Returns:
-
Volume
A non-owning Volume referencing the volume.
- GetRoomByName(name)
-
Get a Room by its name.
Parameters:
- name string The unique name of the room as set in Tomb Editor.
Returns:
-
Room
A non-owning Room referencing the room.
- GetRoomByNumber(name)
-
Get a Room by its number.
Parameters:
- name string The unique number of the room returned by GetRoomNumber functions.
Returns:
-
Room
A non-owning Room referencing the room.
- GetRoomsByTag(tag)
-
Get rooms by tag.
Parameters:
- tag string Tag to select rooms by.
Returns:
-
table
Table of rooms containing the given tag.
- IsNameInUse(name)
-
Check if a given script name is in use by any object type.
Parameters:
- name string The name to check.
Returns:
-
bool
True if name is in use and an object with a given name is present, false if not.
- GetSlotName(objectID)
-
Converts moveable Object ID to a string with internal slot name.
Parameters:
- objectID ObjID Moveable object ID.
Returns:
-
string
Internal slot name.
- GetMoveableProperty(objectID, name)
-
Get a global property for a moveable object ID.
Parameters:
Returns:
-
any
Property value, or nil if not set. You can use Type module functions to determine return value type.
- SetMoveableProperty(objectID, name, value)
-
Set a global property for a moveable object ID. If property does not exist, it creates it. If value is nil, the property is removed.
Parameters:
- GetStaticProperty(slotID, name)
-
Get a global property for a static slot ID.
Parameters:
- slotID int Static slot ID.
- name string Property name.
Returns:
-
any
Property value, or nil if not set. You can use Type module functions to determine return value type.
- SetStaticProperty(slotID, name, value)
-
Set a global property for a static slot ID. If property does not exist, it creates it. If value is nil, the property is removed.
Parameters:
Special objects
- Lara
-
An Objects.LaraObject entry representing Lara herself. Can be used to quickly access player data, without getting Lara moveable by name.
Can be also used with any methods of Objects.Moveable.
- Lara LaraObject A global Lara object.
