Class Objects.LaraObject
-Class for extra player-only functions.
+Class for player-only functions.
Do not try to create an object of this type. Use the built-in Lara variable instead. LaraObject inherits all the functions of Moveable.
@@ -124,63 +124,63 @@LaraObject:SetPoison([poison]) | -Set player poison. | +Set the player's poison value. | |
LaraObject:GetPoison() | -Get poison potency of Lara. | +Get the player's poison value. | |
LaraObject:SetAir(air) | -Set air value of Lara. | +Set the player's air value. | |
LaraObject:GetAir() | -Get air value of Lara. | +Get the player's air value. | |
LaraObject:SetWet(wetness) | -Set wetness value of Lara (causes dripping). | +Set the player's wetness value, causing drips. | |
LaraObject:GetWet() | -Get wetness value of Lara. | +Get the player's wetness value. | |
LaraObject:SetStamina(stamina) | -Set sprint energy value of Lara. | +LaraObject:SetStamina(New) | +Set the player's stamina value. |
LaraObject:GetStamina() | -Get stamina value of Lara. | +Get the player's stamina value. | |
Moveable:GetAirborne() | -Get the moveable's airborne status. | +Get the player's airborne status (set when jumping and falling). | |
Moveable:SetAirborne(airborne) | -Set the moveable's airborne status. | +Set the player's airborne status. | |
LaraObject:UndrawWeapon() | -Lara will undraw her weapon if it is drawn and throw away a flare if she is currently holding one. | +Undraw a weapon if it is drawn and throw away a flare if currently holding one. | |
LaraObject:ThrowAwayTorch() | -Lara will throw away the torch if she currently holds one in her hand. | +LaraObject:DiscardTorch() | +Discard a held torch. |
LaraObject:GetHandStatus() | -Get actual hand status of Lara. | +Get the player's hand status. | |
LaraObject:GetWeaponType() | -Get actual weapon type of Lara. | +Get the player's weapon type. | |
LaraObject:SetWeaponType(weaponType, activate) | -Set Lara weapon type. | +Set the player's weapon type. | |
LaraObject:GetAmmoType() | @@ -203,8 +203,16 @@Get the player's current interacted moveable (if it exists). | ||
LaraObject:TorchIsLit() | -Get current light state of the torch, if it exists | +LaraObject:IsTorchLit() | +Check if a held torch is lit. | +
LaraObject:Interact(mov, [animNumber], [offset], [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint], [actionID]) | +Align the player with a moveable object for interaction. | +||
LaraObject:TestInteraction(mov, [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint]) | +Test the player against a moveable object for interaction. |
- poison int - Poison strength. Maximum value is 128 (default 0) + New poison value. default: 0, max: 128 Optional.
-
int
- Current poison potency.
+ Poison value.
- air int - Air value to give Lara. Maximum value is 1800. + New air value. max: 1800
-
int
- Current air value.
+ Air value.
- wetness int - Wetness value. Maximum value is 255. + New wetness value. max: 255
-
int
- Current wetness value.
+ Wetness value.
Parameters:
-
-
- stamina +
- New int - Stamina to give to Lara. Maximum value is 120. + stamina value. max: 120
-
int
- Current sprint value.
+ Stamina value.
-
bool
- True if Lara state must react to aerial forces.
+ True if airborne, otherwise false.
- airborne bool - New airborne status for Lara. + New airborne status.
Usage:
-
-
Lara:ThrowAwayTorch()+
Lara:DiscardTorch()
-
HandStatus
- Current hand status.
+ Hand status.
-
Moveable
- current vehicle (nil if no vehicle present).
+ Current vehicle (nil if no vehicle present).
-
bool
- is torch currently lit or not? (false if no torch exists)
+ True if lit, otherwise false (also false if there is no torch in hand).
Usage:
-
-
local torchIsLit = Lara:TorchIsLit()
+ local isTorchLit = Lara:IsTorchLit()
+Parameters:
+-
+
- mov + Moveable + Moveable object to align the player with. + +
- animNumber + int + The animation to play after alignment is complete. + Default: 197 (BUTTON_PUSH). + +
- offset + Vec3 + Relative position offset from the moveable. + Default: Vec3(0, 0, 312). + +
- minOffsetConstraint + Vec3 + Minimum relative offset constraint. + Default: Vec3(-256, -512, 0). + +
- maxOffsetConstraint + Vec3 + Maximum relative offset constraint. + Default: Vec3(256, 0, 512). + +
- minRotConstraint + Rotation + Minimum relative rotation constraint. + Default: Rotation(-10, -40, -10). + +
- maxRotConstraint + Rotation + Maximum relative rotation constraint. + Default: Rotation(10, 40, 10). + +
- actionID + ActionID + Input action ID to trigger the alignment. + Default: Input.ActionID.ACTION. + +
Usage:
+-
+
local Lara:Interact( + moveable, 197, + Vec3(0, 0, 312), Vec3(-256, -512, -256), Vec3(256, 0, 512), + Rotation(-10, -30, -10), Rotation(10, 30, 10), TEN.Input.ActionID.ACTION)+ + +
Parameters:
+-
+
- mov + Moveable + Moveable object to align the player with. + +
- minOffsetConstraint + Vec3 + Minimum relative offset constraint. + Default: Vec3(-256, -512, 0). + +
- maxOffsetConstraint + Vec3 + Maximum relative offset constraint. + Default: Vec3(256, 0, 512). + +
- minRotConstraint + Rotation + Minimum relative rotation constraint. + Default: Rotation(-10, -40, -10). + +
- maxRotConstraint + Rotation + Maximum relative rotation constraint. + Default: Rotation(10, 40, 10). + +
Functions
Moveable(object, name, position, rotation, roomNumber, animNumber, frameNumber, hp, OCB, AIBits) | +Moveable(objectID, name, position, [rotation], [roomNumber], [animNumber], [frameNumber], [hp], [OCB], [AIBits]) | Used to generate a new moveable dynamically at runtime. | |
Moveable:GetObjectID() | -Retrieve the object ID | +Retrieve the object ID. | |
Moveable:SetObjectID(objectID) | Change the object's ID. | ||
Moveable:SetOnHit(callback) | +Moveable:SetOnHit(function) | Set the name of the function to be called when the moveable is shot by Lara. | |
Moveable:SetOnKilled(callback) | -Set the name of the function to be called when the moveable is destroyed/killed - Note that enemy death often occurs at the end of an animation, and not at the exact moment - the enemy's HP becomes zero. | +Moveable:SetOnKilled(function) | +Set the name of the function to be called when the moveable is destroyed/killed. |
Moveable:SetOnCollidedWithObject(func) | -Set the function to be called when this moveable collides with another moveable | +Moveable:SetOnCollidedWithObject(function) | +Set the function to be called when this moveable collides with another moveable. |
Moveable:SetOnCollidedWithRoom(func) | +Moveable:SetOnCollidedWithRoom(function) | Set the function called when this moveable collides with room geometry (e.g. | |
Moveable:GetName() | -Get the moveable's name (its unique string identifier) - e.g. | +Get the moveable's name (its unique string identifier). | |
Moveable:SetName(name) | -Set the moveable's name (its unique string identifier) - e.g. | +Set the moveable's name (its unique string identifier). | |
Moveable:GetPosition() | -Get the moveable's position | +Get the moveable's position. | |
Moveable:SetPosition(position, [updateRoom]) | -Set the moveable's position - If you are moving a moveable whose behaviour involves knowledge of room geometry, - (e.g. | +Set the moveable's position. | |
Moveable:GetJointPosition(jointIndex, [offset]) | @@ -177,7 +171,7 @@|||
Moveable:GetJointRotation(index) | -Get the object's joint rotation | +Get the object's joint rotation. | |
Moveable:GetRotation() | @@ -197,24 +191,23 @@|||
Moveable:GetHP() | -Get current HP (hit points/health points) | +Get current HP (hit points / health points). | |
Moveable:SetHP(HP) | -Set current HP (hit points/health points) - Clamped to [0, 32767] for "intelligent" entities (i.e. | +Set current HP (hit points / health points). | |
Moveable:GetSlotHP() | -Get HP definded for that object type (hit points/health points) (Read Only). | +Get HP definded for that object type (hit points / health points). | |
Moveable:GetOCB() | -Get OCB (object code bit) of the moveable | +Get OCB (object code bit) of the moveable. | |
Moveable:SetOCB(OCB) | -Set OCB (object code bit) of the moveable | +Set OCB (object code bit) of the moveable. | |
Moveable:SetEffect(effect, [timeout]) | @@ -222,23 +215,23 @@|||
Moveable:SetCustomEffect(color1, color2, [timeout]) | -Set custom colored burn effect to moveable | +Set custom colored burn effect to moveable. | |
Moveable:GetEffect() | -Get current moveable effect | +Get current moveable effect. | |
Moveable:GetItemFlags(index) | -Get the value stored in ItemFlags[index] | +Get the value stored in ItemFlags[index]. | |
Moveable:SetItemFlags(value, index) | -Stores a value in ItemFlags[index] | +Stores a value in ItemFlags[index]. | |
Moveable:GetLocationAI() | -Get the location value stored in the Enemy AI | +Get the location value stored in the Enemy AI. | |
Moveable:SetLocationAI(value) | @@ -246,23 +239,19 @@|||
Moveable:GetColor() | -Get the moveable's color | +Get the moveable's color. | |
Moveable:SetColor(color) | -Set the moveable's color | +Set the moveable's color. | |
Moveable:GetAIBits() | -Get AIBits of object - This will return a table with six values, each corresponding to - an active behaviour. | +Get AIBits of object. | |
Moveable:SetAIBits(bits) | -Set AIBits of object - Use this to force a moveable into a certain AI mode or modes, as if a certain nullmesh - (or more than one) had suddenly spawned beneath their feet. | +Set AIBits of object. | |
Moveable:GetState() | @@ -310,7 +299,7 @@|||
Moveable:GetActive() | -Determine whether the moveable is active or not | +Determine whether the moveable is active or not. | |
Moveable:GetHitStatus() | @@ -318,11 +307,11 @@|||
Moveable:GetRoom() | -Get the current room of the object | +Get the current room of the moveable. | |
Moveable:GetRoomNumber() | -Get the current room number of the object | +Get the current room number of the moveable. | |
Moveable:SetRoomNumber(roomID) | @@ -338,48 +327,39 @@|||
Moveable:GetMeshCount() | -Get number of meshes for a particular object - Returns number of meshes in an object | +Get number of meshes for a particular object. | |
Moveable:GetMeshVisible(index) | -Get state of specified mesh visibility of object - Returns true if specified mesh is visible on an object, and false - if it is not visible. | +Get state of specified mesh visibility of object. | |
Moveable:SetMeshVisible(index, isVisible) | -Makes specified mesh visible or invisible - Use this to show or hide a specified mesh of an object. | +Makes specified mesh visible or invisible. | |
Moveable:ShatterMesh(index) | -Shatters specified mesh and makes it invisible - Note that you can re-enable mesh later by using SetMeshVisible(). | +Shatters specified mesh and makes it invisible. | |
Moveable:GetMeshSwapped(index) | -Get state of specified mesh swap of object - Returns true if specified mesh is swapped on an object, and false - if it is not swapped. | +Get state of specified mesh swap of object. | |
Moveable:SwapMesh(index, slotIndex, [swapIndex]) | -Set state of specified mesh swap of object - Use this to swap specified mesh of an object. | +Set state of specified mesh swap of object. | |
Moveable:UnswapMesh(index) | -Set state of specified mesh swap of object - Use this to bring back original unswapped mesh | +Set state of specified mesh swap of object. | |
Moveable:Enable(timeout) | +Moveable:Enable([timeout]) | Enable the item, as if a trigger for it had been stepped on. | |
Moveable:Disable() | -Disable the item, as if an antitrigger for it had been stepped on (i.e. | +Disable the item, as if an antitrigger for it had been stepped on. | |
Moveable:Explode() | @@ -398,16 +378,12 @@Set the item's collision. | ||
Moveable:MakeInvisible() | -Make the item invisible. | -||
Moveable:SetVisible(visible) | Set the item's visibility. | ||
Moveable:GetValid() | -Test if the object is in a valid state (i.e. | +Test if the object is in a valid state. | |
Moveable:Destroy() | @@ -419,7 +395,7 @@|||
Moveable:AnimFromObject(objectID, animNumber, stateID) | -Borrow animation from an object | +Borrow animation from an object. |
- - Moveable(object, name, position, rotation, roomNumber, animNumber, frameNumber, hp, OCB, AIBits) + Moveable(objectID, name, position, [rotation], [roomNumber], [animNumber], [frameNumber], [hp], [OCB], [AIBits])
-
Used to generate a new moveable dynamically at runtime.
@@ -444,9 +420,9 @@ most can just be ignored (see usage).
Parameters:
-
-
- object +
- objectID ObjID - ID + Object ID.
- name string @@ -454,43 +430,50 @@ most can just be ignored (see usage).
- position Vec3 - position in level + Position in level.
- rotation Rotation - rotation rotation about x, y, and z axes (default Rotation(0, 0, 0)) + Rotation about x, y, and z axes. + Optional.
- roomNumber int - the room number the moveable is in (default: calculated automatically). + The room number the moveable is in. Needed if you are dealing with overlapping rooms and need to force certain room number. + Optional.
- animNumber int - animation number + Animation number. + Optional.
- frameNumber int - frame number + Frame number. + Optional.
- hp int Hit points. + Optional.
- OCB int Object code bits. + Optional.
- AIBits table - table with AI bits (default { 0, 0, 0, 0, 0, 0 }) + Table with six AI bits. + Optional.
Returns:
-
- Moveable
- A new Moveable object (a wrapper around the new object)
+ Moveable
+ A new Moveable object.
- - Retrieve the object ID + Retrieve the object ID. @@ -518,7 +501,7 @@ most can just be ignored (see usage).
-
ObjID
- a number representing the ID of the object.
+ A number representing the ID of the object.
- objectID ObjID - the new ID + The new ID.
- - Moveable:SetOnHit(callback) + Moveable:SetOnHit(function)
-
Set the name of the function to be called when the moveable is shot by Lara.
@@ -564,9 +547,9 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)
Parameters:
-
-
- callback +
- function function - function in LevelFuncs hierarchy to call when moveable is shot + Callback function in LevelFuncs hierarchy to call when moveable is shot.
- - Moveable:SetOnKilled(callback) + Moveable:SetOnKilled(function)
-
- Set the name of the function to be called when the moveable is destroyed/killed
+ Set the name of the function to be called when the moveable is destroyed/killed.
Note that enemy death often occurs at the end of an animation, and not at the exact moment
the enemy's HP becomes zero.
@@ -588,9 +571,9 @@ shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)
Parameters:
-
-
- callback +
- function function - function in LevelFuncs hierarchy to call when enemy is killed + Callback function in LevelFuncs hierarchy to call when moveable is killed.
- - Moveable:SetOnCollidedWithObject(func) + Moveable:SetOnCollidedWithObject(function)
-
- Set the function to be called when this moveable collides with another moveable
+ Set the function to be called when this moveable collides with another moveable.
Parameters:
-
-
- func +
- function function - callback function to be called (must be in LevelFuncs hierarchy). This function can take two arguments; these will store the two Moveables taking part in the collision. + Callback function to be called (must be in LevelFuncs hierarchy). This function can take two arguments; these will store the two Moveables taking part in the collision.
- - Moveable:SetOnCollidedWithRoom(func) + Moveable:SetOnCollidedWithRoom(function)
-
Set the function called when this moveable collides with room geometry (e.g. a wall or floor). This function can take an argument that holds the Moveable that collided with geometry.
@@ -647,9 +630,9 @@ baddy:SetOnCollidedWithObject(LevelFuncs.objCollided)
Parameters:
-
-
- func +
- function function - callback function to be called (must be in LevelFuncs hierarchy) + Callback function to be called (must be in LevelFuncs hierarchy).
- - Get the moveable's name (its unique string identifier) - e.g. "door_back_room" or "cracked_greek_statue" - This corresponds with the "Lua Name" field in an object's properties in Tomb Editor. + Get the moveable's name (its unique string identifier). This corresponds with the "Lua Name" field in an object's properties in Tomb Editor. @@ -681,7 +662,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
-
string
- the moveable's name
+ The moveable's name.
- - Set the moveable's name (its unique string identifier) - e.g. "door_back_room" or "cracked_greek_statue" - It cannot be blank and cannot share a name with any existing object. + Set the moveable's name (its unique string identifier). It cannot be blank and cannot share a name with any existing object. @@ -703,7 +682,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
- name string - the new moveable's name + The new moveable's name.
-
bool
- true if we successfully set the name, false otherwise (e.g. if another object has the name already)
+ true if name was successfully set, false otherwise (e.g. if another moveable has the name already).
- - Get the moveable's position + Get the moveable's position. @@ -732,7 +711,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
-
Vec3
- a copy of the moveable's position
+ Moveable's position.
- - Set the moveable's position - If you are moving a moveable whose behaviour involves knowledge of room geometry, - (e.g. a BADDY1, which uses it for pathfinding), then the second argument should - be true (or omitted, as true is the default). Otherwise, said moveable will not behave correctly. + Set the moveable's position. @@ -755,12 +731,12 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
- position Vec3 - the new position of the moveable + The new position of the moveable.
- updateRoom bool - Will room changes be automatically detected? Set to false if you are using overlapping rooms (default: true) - Optional. + Will room changes be automatically detected? Set to false if you are using overlapping rooms. + Default: true.
- - Get the object's joint rotation + Get the object's joint rotation. @@ -823,7 +799,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
-
Rotation
- a calculated copy of the moveable's joint rotation
+ Moveable's joint rotation.
-
Rotation
- A copy of the moveable's rotation.
+ Moveable's rotation.
-
Vec3
- A copy of the moveable's visual scale.
+ Moveable's visual scale.
- rotation Rotation - The moveable's new rotation + The moveable's new rotation.
- - Get current HP (hit points/health points) + Get current HP (hit points / health points). @@ -930,7 +906,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
-
int
- the amount of HP the moveable currently has
+ The amount of HP the moveable currently has.
- - Set current HP (hit points/health points) - Clamped to [0, 32767] for "intelligent" entities (i.e. anything with AI); clamped to [-32767, 32767] otherwise. + Set current HP (hit points / health points). + Clamped to [0, 32767] for "intelligent" entities (i.e. anything with AI); clamped to [-32767, 32767] otherwise. @@ -951,7 +927,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
- HP int - the amount of HP to give the moveable + The amount of HP to give the moveable.
- - Get HP definded for that object type (hit points/health points) (Read Only). + Get HP definded for that object type (hit points / health points). @@ -974,7 +950,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
-
int
- the moveable's slot default hit points
+ The moveable's slot default hit points.
- - Get OCB (object code bit) of the moveable + Get OCB (object code bit) of the moveable. @@ -995,7 +971,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
-
int
- the moveable's current OCB value
+ The moveable's current OCB value.
- - Set OCB (object code bit) of the moveable + Set OCB (object code bit) of the moveable. @@ -1015,7 +991,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
- OCB int - the new value for the moveable's OCB + The new value for the moveable's OCB.
- timeout float - time (in seconds) after which effect turns off. + Time (in seconds) after which effect turns off. Optional.
@@ -1056,7 +1032,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided) Moveable:SetCustomEffect(color1, color2, [timeout])- - Set custom colored burn effect to moveable + Set custom colored burn effect to moveable. @@ -1087,7 +1063,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided) Moveable:GetEffect()
- - Get current moveable effect + Get current moveable effect. @@ -1108,7 +1084,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided) Moveable:GetItemFlags(index)
- - Get the value stored in ItemFlags[index] + Get the value stored in ItemFlags[index]. @@ -1124,7 +1100,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
-
int
- the value contained in the ItemFlags[index]
+ The value contained in the ItemFlags[index].
- - Stores a value in ItemFlags[index] + Stores a value in ItemFlags[index]. @@ -1162,7 +1138,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided) Moveable:GetLocationAI()
- - Get the location value stored in the Enemy AI + Get the location value stored in the Enemy AI. @@ -1171,7 +1147,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
-
short
- the value contained in the LocationAI of the creature.
+ The value contained in the LocationAI of the creature.
- - Get the moveable's color + Get the moveable's color. @@ -1214,7 +1190,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
-
Color
- a copy of the moveable's color
+ Moveable's color.
- - Set the moveable's color + Set the moveable's color. @@ -1234,7 +1210,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
- color Color - the new color of the moveable + The new color of the moveable.
- -
Get AIBits of object +
Get AIBits of object. This will return a table with six values, each corresponding to - an active behaviour. If the object is in a certain AI mode, the table will + an active behaviour. If the object is in a certain AI mode, the table will have a 1 in the corresponding cell. Otherwise, the cell will hold a 0.
@@ -1272,7 +1248,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)-
table
- a table of AI bits
+ A table of AI bits.
- - Set AIBits of object + Set AIBits of object. Use this to force a moveable into a certain AI mode or modes, as if a certain nullmesh (or more than one) had suddenly spawned beneath their feet. @@ -1294,7 +1270,7 @@ baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)
- bits table - the table of AI bits + A table of AI bits.
int - the index of the active state + The index of the active state. @@ -1345,7 +1321,7 @@ sas:SetAIBits({1, 0, int - the index of the target state + The index of the target state. @@ -1367,7 +1343,7 @@ sas:SetAIBits({1, 0, - index int - the index of the desired state + The index of the desired state.
@@ -1392,7 +1368,7 @@ sas:SetAIBits({1, 0,int - animation slot ID + Animation slot ID. @@ -1414,7 +1390,7 @@ sas:SetAIBits({1, 0, int - the index of the active animation + The index of the active animation. @@ -1436,11 +1412,11 @@ sas:SetAIBits({1, 0, - index int - the index of the desired anim + The index of the desired animation.
- slot int - slot ID of the desired anim (if omitted, moveable's own slot ID is used) + Slot ID of the desired anim (if omitted, moveable's own slot ID is used). Optional.
@@ -1465,7 +1441,7 @@ sas:SetAIBits({1, 0,int - the current frame of the active animation + The current frame of the active animation. @@ -1488,7 +1464,7 @@ sas:SetAIBits({1, 0, Vec3 - current object velocity + Current object velocity. @@ -1510,7 +1486,7 @@ sas:SetAIBits({1, 0, - velocity Vec3 - velocity represented as vector + Velocity represented as vector.
@@ -1536,7 +1512,7 @@ sas:SetAIBits({1, 0,- frame int - the new frame number + The new frame number.
@@ -1572,7 +1548,7 @@ sas:SetAIBits({1, 0,Moveable:GetActive() - - Determine whether the moveable is active or not + Determine whether the moveable is active or not. @@ -1581,7 +1557,7 @@ sas:SetAIBits({1, 0,
bool - true if the moveable is active + True if the moveable is active. @@ -1602,7 +1578,7 @@ sas:SetAIBits({1, 0, bool - true if the moveable was hit by something in the last gameplay frame, false otherwise + true if the moveable was hit by something in the last gameplay frame, false otherwise. @@ -1614,7 +1590,7 @@ sas:SetAIBits({1, 0, Moveable:GetRoom() - - Get the current room of the object + Get the current room of the moveable. @@ -1623,7 +1599,7 @@ sas:SetAIBits({1, 0,
Room - current room of the object + Current room of the moveable. @@ -1635,7 +1611,7 @@ sas:SetAIBits({1, 0, Moveable:GetRoomNumber() - - Get the current room number of the object + Get the current room number of the moveable. @@ -1644,7 +1620,7 @@ sas:SetAIBits({1, 0,
int - number representing the current room of the object + Number representing the current room of the moveable. @@ -1728,7 +1704,7 @@ sas:SetPosition(newPos, false) Moveable:GetMeshCount() - - Get number of meshes for a particular object + Get number of meshes for a particular object. Returns number of meshes in an object @@ -1738,7 +1714,7 @@ sas:SetPosition(newPos, false)
-
int
- number of meshes
+ Number of meshes.
- - Get state of specified mesh visibility of object + Get state of specified mesh visibility of object. Returns true if specified mesh is visible on an object, and false if it is not visible. @@ -1760,7 +1736,7 @@ sas:SetPosition(newPos, false)
- index int - index of a mesh + Index of a mesh.
-
bool
- visibility status
+ Visibility status.
- - Makes specified mesh visible or invisible + Makes specified mesh visible or invisible. Use this to show or hide a specified mesh of an object. @@ -1789,11 +1765,11 @@ sas:SetPosition(newPos, false)
- index int - index of a mesh + Index of a mesh.
- isVisible bool - true if you want the mesh to be visible, false otherwise + true if you want the mesh to be visible, false otherwise.
- - Shatters specified mesh and makes it invisible + Shatters specified mesh and makes it invisible. Note that you can re-enable mesh later by using SetMeshVisible(). @@ -1816,7 +1792,7 @@ sas:SetPosition(newPos, false)
- index int - index of a mesh + Index of a mesh to shatter.
- - Get state of specified mesh swap of object - Returns true if specified mesh is swapped on an object, and false - if it is not swapped. + Get state of specified mesh swap of object. + Returns true if specified mesh is swapped on an object, and false if it is not swapped. @@ -1840,7 +1815,7 @@ sas:SetPosition(newPos, false)
- index int - index of a mesh + Index of a mesh.
-
bool
- mesh swap status
+ Mesh swap status.
- - Set state of specified mesh swap of object + Set state of specified mesh swap of object. Use this to swap specified mesh of an object. @@ -1869,15 +1844,15 @@ sas:SetPosition(newPos, false)
- index int - index of a mesh + Index of a mesh.
- slotIndex int - index of a slot to get meshswap from + Index of a slot to get meshswap from.
- swapIndex int - index of a mesh from meshswap slot to use + Index of a mesh from meshswap slot to use. Optional.
- - Set state of specified mesh swap of object + Set state of specified mesh swap of object. Use this to bring back original unswapped mesh @@ -1901,7 +1876,7 @@ sas:SetPosition(newPos, false)
- index int - index of a mesh to unswap + Index of a mesh to unswap.
- - Moveable:Enable(timeout) + Moveable:Enable([timeout])
- Enable the item, as if a trigger for it had been stepped on. @@ -1923,7 +1898,8 @@ sas:SetPosition(newPos, false)
- timeout float - time (in seconds) after which moveable automatically disables (optional). + Time (in seconds) after which moveable automatically disables. + Optional.
- - Disable the item, as if an antitrigger for it had been stepped on (i.e. it will close an open door or extinguish a flame emitter). - Note that this will not trigger an OnKilled callback. + Disable the item, as if an antitrigger for it had been stepped on. + For example, it will close an open door or extinguish a flame emitter. Note that this will not trigger an OnKilled callback. @@ -1992,7 +1968,7 @@ sas:SetPosition(newPos, false)
--
bool
- item's collision state
+ Item's collision state.
- - - Moveable:MakeInvisible() -
-- - Make the item invisible. Alias for
Moveable:SetVisible(false)
. - - - - - - - -- Moveable:SetVisible(visible)
- - Set the item's visibility. An invisible item will have collision turned off, as if it no longer exists in the game world. + Set the item's visibility. An invisible item will have collision turned off, as if it no longer exists in the game world. @@ -2049,7 +2010,7 @@ sas:SetPosition(newPos, false)
- visible bool - true if the caller should become visible, false if it should become invisible + true if the caller should become visible, false if it should become invisible.
- - Test if the object is in a valid state (i.e. has not been destroyed through Lua or killed by Lara). + Test if the object is in a valid state. Indicates that it has not been destroyed through Lua or killed by Lara. @@ -2072,7 +2033,7 @@ sas:SetPosition(newPos, false)
-
bool
- valid true if the object is still not destroyed
+ true if the object is still not destroyed.
- target - Moveable + Moveable Target moveable to attach camera to.
- mesh @@ -2129,7 +2090,7 @@ sas:SetPosition(newPos, false) Moveable:AnimFromObject(objectID, animNumber, stateID)
- - Borrow animation from an object + Borrow animation from an object. @@ -2137,7 +2098,7 @@ sas:SetPosition(newPos, false)
- objectID ObjID - Object ID to take animation and stateID from. + Object ID to take animation and state ID from.
- animNumber int @@ -2145,7 +2106,7 @@ sas:SetPosition(newPos, false)
- stateID int - state State from object. + State from object.
TombEngine 1.8.1 Lua API +TombEngine 1.8.2 Lua API diff --git a/Documentation/doc/2 classes/Objects.Sink.html b/Documentation/doc/2 classes/Objects.Sink.html index 54ee6f9de..67e467d19 100644 --- a/Documentation/doc/2 classes/Objects.Sink.html +++ b/Documentation/doc/2 classes/Objects.Sink.html @@ -3,7 +3,7 @@ -TombEngine 1.8.1 Lua API +TombEngine 1.8.2 Lua API diff --git a/Documentation/doc/2 classes/Objects.SoundSource.html b/Documentation/doc/2 classes/Objects.SoundSource.html index 6daf287f2..1ff54349a 100644 --- a/Documentation/doc/2 classes/Objects.SoundSource.html +++ b/Documentation/doc/2 classes/Objects.SoundSource.html @@ -3,7 +3,7 @@ -TombEngine 1.8.1 Lua API +TombEngine 1.8.2 Lua API @@ -125,27 +125,27 @@SoundSource:GetPosition() -Get the sound source's position +Get the sound source's position. SoundSource:SetPosition(position) -Set the sound source's position +Set the sound source's position. SoundSource:GetName() -Get the sound source's unique string identifier +Get the sound source's unique string identifier. SoundSource:SetName(name) -Set the sound source's name (its unique string identifier) +Set the sound source's unique string identifier. SoundSource:GetSoundID() -Get the sound source's unique int identifier +Get the sound source's sound ID. SoundSource:SetSoundID(name) -Set the sound source's ID +Set the sound source's ID. - - Get the sound source's position + Get the sound source's position. @@ -170,7 +170,7 @@
-
Vec3
- a copy of the sound source's position
+ Sound source's position.
- - Set the sound source's position + Set the sound source's position. @@ -190,7 +190,7 @@
- position Vec3 - the new position of the sound source + The new position of the sound source.
- - Get the sound source's unique string identifier + Get the sound source's unique string identifier. @@ -213,7 +213,7 @@
-
string
- the sound source's name
+ The sound source's name.
- - Set the sound source's name (its unique string identifier) + Set the sound source's unique string identifier. @@ -233,7 +233,7 @@
- name string - The sound source's new name + The sound source's new name.
- - Get the sound source's unique int identifier + Get the sound source's sound ID. @@ -256,7 +256,7 @@
-
int
- the ID of the sound
+ The ID of the sound.
- - Set the sound source's ID + Set the sound source's ID. @@ -276,7 +276,7 @@
- name int - The sound source's new name + The sound source's new sound ID.
TombEngine 1.8.1 Lua API +TombEngine 1.8.2 Lua API @@ -381,7 +381,7 @@-
bool
- Status. true: visible, false: invisible
+ Status. true means visible, false otherwise.
-
bool
- Collision status. true: can be collided with, false: no collision
+ Collision status. true if can be collided with, false otherwise.
-
bool
- Solid Status. true: solid, false: soft
+ Solid Status. true if solid, false if soft.
- status bool - New status. true: solid, false: soft + New status, true is solid, false is soft.
- collidable bool - New collision status. true: can be collided with, false: no collision + New collision status. true if can be collided with, false: no collision.
TombEngine 1.8.1 Lua API +TombEngine 1.8.2 Lua API @@ -160,7 +160,7 @@Determine if this volume is active.