mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
2167 lines
57 KiB
HTML
2167 lines
57 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<head>
|
|
<title>TombEngine 1.8.1 Lua API</title>
|
|
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div> <!-- id="product" -->
|
|
|
|
|
|
<div id="main">
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
<div id="navigation">
|
|
<br/>
|
|
<h1> TombEngine</h1>
|
|
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
</ul>
|
|
|
|
<h2>1 Modules</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../1 modules/Effects.html">Effects</a></li>
|
|
<li> <a href="../1 modules/Flow.html">Flow</a></li>
|
|
<li> <a href="../1 modules/Input.html">Input</a></li>
|
|
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
|
|
<li> <a href="../1 modules/Logic.html">Logic</a></li>
|
|
<li> <a href="../1 modules/Objects.html">Objects</a></li>
|
|
<li> <a href="../1 modules/Sound.html">Sound</a></li>
|
|
<li> <a href="../1 modules/Strings.html">Strings</a></li>
|
|
<li> <a href="../1 modules/Util.html">Util</a></li>
|
|
<li> <a href="../1 modules/View.html">View</a></li>
|
|
</ul>
|
|
<h2>2 Classes</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
|
|
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
|
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
|
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
|
|
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
|
|
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
|
|
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
|
|
<li> <here>Objects.Moveable</here></li>
|
|
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
|
|
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
|
|
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
|
|
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
|
|
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
|
|
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
|
|
<li> <a href="../2 classes/View.DisplaySprite.html">View.DisplaySprite</a></li>
|
|
</ul>
|
|
<h2>3 Primitive Classes</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../3 primitive classes/Flow.Fog.html">Flow.Fog</a></li>
|
|
<li> <a href="../3 primitive classes/Flow.Horizon.html">Flow.Horizon</a></li>
|
|
<li> <a href="../3 primitive classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
|
<li> <a href="../3 primitive classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
|
<li> <a href="../3 primitive classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
|
<li> <a href="../3 primitive classes/Flow.Starfield.html">Flow.Starfield</a></li>
|
|
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
|
|
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
|
|
<li> <a href="../3 primitive classes/Time.html">Time</a></li>
|
|
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
|
|
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
|
|
</ul>
|
|
<h2>4 Enums</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
|
|
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
|
|
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
|
|
<li> <a href="../4 enums/Effects.StreamerFeatherMode.html">Effects.StreamerFeatherMode</a></li>
|
|
<li> <a href="../4 enums/Effects.ParticleAnimationType.html">Effects.ParticleAnimationType</a></li>
|
|
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>
|
|
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
|
|
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
|
|
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
|
|
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
|
|
<li> <a href="../4 enums/Objects.HandStatus.html">Objects.HandStatus</a></li>
|
|
<li> <a href="../4 enums/Objects.WeaponType.html">Objects.WeaponType</a></li>
|
|
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
|
|
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
|
|
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
|
|
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
|
|
<li> <a href="../4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></li>
|
|
<li> <a href="../4 enums/Strings.DisplayStringOption.html">Strings.DisplayStringOption</a></li>
|
|
<li> <a href="../4 enums/Util.LogLevel.html">Util.LogLevel</a></li>
|
|
<li> <a href="../4 enums/View.AlignMode.html">View.AlignMode</a></li>
|
|
<li> <a href="../4 enums/View.CameraType.html">View.CameraType</a></li>
|
|
<li> <a href="../4 enums/View.PostProcessMode.html">View.PostProcessMode</a></li>
|
|
<li> <a href="../4 enums/View.ScaleMode.html">View.ScaleMode</a></li>
|
|
</ul>
|
|
<h2>5 Lua utility modules</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../5 lua utility modules/CustomBar.html">CustomBar</a></li>
|
|
<li> <a href="../5 lua utility modules/Diary.html">Diary</a></li>
|
|
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
|
|
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
|
|
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Class <code>Objects.Moveable</code></h1>
|
|
<p>Represents a moveable object in the game world.</p>
|
|
<p> Examples include the player, traps, enemies, doors, and pickups. See also <a href="../2 classes/Objects.LaraObject.html#">Objects.LaraObject</a> for player-specific features.</p>
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable">Moveable(object, name, position, rotation, roomNumber, animNumber, frameNumber, hp, OCB, AIBits)</a></td>
|
|
<td class="summary">Used to generate a new moveable dynamically at runtime.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetObjectID">Moveable:GetObjectID()</a></td>
|
|
<td class="summary">Retrieve the object ID</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetObjectID">Moveable:SetObjectID(objectID)</a></td>
|
|
<td class="summary">Change the object's ID.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetOnHit">Moveable:SetOnHit(callback)</a></td>
|
|
<td class="summary">Set the name of the function to be called when the moveable is shot by Lara.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetOnKilled">Moveable:SetOnKilled(callback)</a></td>
|
|
<td class="summary">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.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetOnCollidedWithObject">Moveable:SetOnCollidedWithObject(func)</a></td>
|
|
<td class="summary">Set the function to be called when this moveable collides with another moveable</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetOnCollidedWithRoom">Moveable:SetOnCollidedWithRoom(func)</a></td>
|
|
<td class="summary">Set the function called when this moveable collides with room geometry (e.g.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetName">Moveable:GetName()</a></td>
|
|
<td class="summary">Get the moveable's name (its unique string identifier)
|
|
e.g.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetName">Moveable:SetName(name)</a></td>
|
|
<td class="summary">Set the moveable's name (its unique string identifier)
|
|
e.g.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetPosition">Moveable:GetPosition()</a></td>
|
|
<td class="summary">Get the moveable's position</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetPosition">Moveable:SetPosition(position, [updateRoom])</a></td>
|
|
<td class="summary">Set the moveable's position
|
|
If you are moving a moveable whose behaviour involves knowledge of room geometry,
|
|
(e.g.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetJointPosition">Moveable:GetJointPosition(jointIndex, [offset])</a></td>
|
|
<td class="summary">Get the moveable's joint position with an optional relative offset.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetJointRotation">Moveable:GetJointRotation(index)</a></td>
|
|
<td class="summary">Get the object's joint rotation</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetRotation">Moveable:GetRotation()</a></td>
|
|
<td class="summary">Get the moveable's rotation.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetScale">Moveable:GetScale()</a></td>
|
|
<td class="summary">Get the moveable's visual scale.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetRotation">Moveable:SetRotation(rotation)</a></td>
|
|
<td class="summary">Set the moveable's rotation.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetScale">Moveable:SetScale(scale)</a></td>
|
|
<td class="summary">Set the moveable's visual scale.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetHP">Moveable:GetHP()</a></td>
|
|
<td class="summary">Get current HP (hit points/health points)</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetHP">Moveable:SetHP(HP)</a></td>
|
|
<td class="summary">Set current HP (hit points/health points)
|
|
Clamped to [0, 32767] for "intelligent" entities (i.e.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetSlotHP">Moveable:GetSlotHP()</a></td>
|
|
<td class="summary">Get HP definded for that object type (hit points/health points) (Read Only).</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetOCB">Moveable:GetOCB()</a></td>
|
|
<td class="summary">Get OCB (object code bit) of the moveable</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetOCB">Moveable:SetOCB(OCB)</a></td>
|
|
<td class="summary">Set OCB (object code bit) of the moveable</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetEffect">Moveable:SetEffect(effect, [timeout])</a></td>
|
|
<td class="summary">Set the effect for this moveable.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetCustomEffect">Moveable:SetCustomEffect(color1, color2, [timeout])</a></td>
|
|
<td class="summary">Set custom colored burn effect to moveable</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetEffect">Moveable:GetEffect()</a></td>
|
|
<td class="summary">Get current moveable effect</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetItemFlags">Moveable:GetItemFlags(index)</a></td>
|
|
<td class="summary">Get the value stored in ItemFlags[index]</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetItemFlags">Moveable:SetItemFlags(value, index)</a></td>
|
|
<td class="summary">Stores a value in ItemFlags[index]</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetLocationAI">Moveable:GetLocationAI()</a></td>
|
|
<td class="summary">Get the location value stored in the Enemy AI</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetLocationAI">Moveable:SetLocationAI(value)</a></td>
|
|
<td class="summary">Updates the location in the enemy AI with the given value.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetColor">Moveable:GetColor()</a></td>
|
|
<td class="summary">Get the moveable's color</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetColor">Moveable:SetColor(color)</a></td>
|
|
<td class="summary">Set the moveable's color</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetAIBits">Moveable:GetAIBits()</a></td>
|
|
<td class="summary">Get AIBits of object
|
|
This will return a table with six values, each corresponding to
|
|
an active behaviour.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetAIBits">Moveable:SetAIBits(bits)</a></td>
|
|
<td class="summary">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.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetState">Moveable:GetState()</a></td>
|
|
<td class="summary">Retrieve the index of the current state.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetTargetState">Moveable:GetTargetState()</a></td>
|
|
<td class="summary">Retrieve the index of the target state.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetState">Moveable:SetState(index)</a></td>
|
|
<td class="summary">Set the object's state to the one specified by the given index.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetAnimSlot">Moveable:GetAnimSlot()</a></td>
|
|
<td class="summary">Retrieve the slot ID of the animation.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetAnim">Moveable:GetAnim()</a></td>
|
|
<td class="summary">Retrieve the index of the current animation.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetAnim">Moveable:SetAnim(index, [slot])</a></td>
|
|
<td class="summary">Set the object's animation to the one specified by the given index.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetFrame">Moveable:GetFrame()</a></td>
|
|
<td class="summary">Retrieve frame number.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetVelocity">Moveable:GetVelocity()</a></td>
|
|
<td class="summary">Get the object's velocity.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetVelocity">Moveable:SetVelocity(velocity)</a></td>
|
|
<td class="summary">Set the object's velocity to specified value.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetFrame">Moveable:SetFrame(frame)</a></td>
|
|
<td class="summary">Set frame number.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetEndFrame">Moveable:GetEndFrame()</a></td>
|
|
<td class="summary">Get the end frame number of the moveable's active animation.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetActive">Moveable:GetActive()</a></td>
|
|
<td class="summary">Determine whether the moveable is active or not</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetHitStatus">Moveable:GetHitStatus()</a></td>
|
|
<td class="summary">Get the hit status of the moveable.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetRoom">Moveable:GetRoom()</a></td>
|
|
<td class="summary">Get the current room of the object</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetRoomNumber">Moveable:GetRoomNumber()</a></td>
|
|
<td class="summary">Get the current room number of the object</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetRoomNumber">Moveable:SetRoomNumber(roomID)</a></td>
|
|
<td class="summary">Set the room ID of a moveable.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetStatus">Moveable:GetStatus()</a></td>
|
|
<td class="summary">Get the moveable's status.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetStatus">Moveable:SetStatus(status)</a></td>
|
|
<td class="summary">Set the moveable's status.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetMeshCount">Moveable:GetMeshCount()</a></td>
|
|
<td class="summary">Get number of meshes for a particular object
|
|
Returns number of meshes in an object</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetMeshVisible">Moveable:GetMeshVisible(index)</a></td>
|
|
<td class="summary">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.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetMeshVisible">Moveable:SetMeshVisible(index, isVisible)</a></td>
|
|
<td class="summary">Makes specified mesh visible or invisible
|
|
Use this to show or hide a specified mesh of an object.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:ShatterMesh">Moveable:ShatterMesh(index)</a></td>
|
|
<td class="summary">Shatters specified mesh and makes it invisible
|
|
Note that you can re-enable mesh later by using SetMeshVisible().</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetMeshSwapped">Moveable:GetMeshSwapped(index)</a></td>
|
|
<td class="summary">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.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SwapMesh">Moveable:SwapMesh(index, slotIndex, [swapIndex])</a></td>
|
|
<td class="summary">Set state of specified mesh swap of object
|
|
Use this to swap specified mesh of an object.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:UnswapMesh">Moveable:UnswapMesh(index)</a></td>
|
|
<td class="summary">Set state of specified mesh swap of object
|
|
Use this to bring back original unswapped mesh</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:Enable">Moveable:Enable(timeout)</a></td>
|
|
<td class="summary">Enable the item, as if a trigger for it had been stepped on.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:Disable">Moveable:Disable()</a></td>
|
|
<td class="summary">Disable the item, as if an antitrigger for it had been stepped on (i.e.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:Explode">Moveable:Explode()</a></td>
|
|
<td class="summary">Explode this moveable.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:Shatter">Moveable:Shatter()</a></td>
|
|
<td class="summary">Shatter this moveable.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetCollidable">Moveable:GetCollidable()</a></td>
|
|
<td class="summary">Get the item's collision state.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetCollidable">Moveable:SetCollidable(collidable)</a></td>
|
|
<td class="summary">Set the item's collision.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:MakeInvisible">Moveable:MakeInvisible()</a></td>
|
|
<td class="summary">Make the item invisible.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:SetVisible">Moveable:SetVisible(visible)</a></td>
|
|
<td class="summary">Set the item's visibility.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:GetValid">Moveable:GetValid()</a></td>
|
|
<td class="summary">Test if the object is in a valid state (i.e.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:Destroy">Moveable:Destroy()</a></td>
|
|
<td class="summary">Destroy the moveable.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:AttachObjCamera">Moveable:AttachObjCamera(mesh, target, mesh)</a></td>
|
|
<td class="summary">Attach camera to an object.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#Moveable:AnimFromObject">Moveable:AnimFromObject(objectID, animNumber, stateID)</a></td>
|
|
<td class="summary">Borrow animation from an object</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "Moveable"></a>
|
|
<strong>Moveable(object, name, position, rotation, roomNumber, animNumber, frameNumber, hp, OCB, AIBits)</strong>
|
|
</dt>
|
|
<dd>
|
|
Used to generate a new moveable dynamically at runtime.
|
|
For more information on each parameter, see the
|
|
associated getters and setters. If you do not know what to set for these,
|
|
most can just be ignored (see usage).
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">object</span>
|
|
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
|
|
ID
|
|
</li>
|
|
<li><span class="parameter">name</span>
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
|
|
Lua name.
|
|
</li>
|
|
<li><span class="parameter">position</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
position in level
|
|
</li>
|
|
<li><span class="parameter">rotation</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
|
|
rotation rotation about x, y, and z axes (default Rotation(0, 0, 0))
|
|
</li>
|
|
<li><span class="parameter">roomNumber</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
the room number the moveable is in (default: calculated automatically).
|
|
</li>
|
|
<li><span class="parameter">animNumber</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
animation number
|
|
</li>
|
|
<li><span class="parameter">frameNumber</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
frame number
|
|
</li>
|
|
<li><span class="parameter">hp</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Hit points.
|
|
</li>
|
|
<li><span class="parameter">OCB</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Object code bits.
|
|
</li>
|
|
<li><span class="parameter">AIBits</span>
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
|
|
table with AI bits (default { 0, 0, 0, 0, 0, 0 })
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#Moveable">Moveable</a></span>
|
|
A new Moveable object (a wrapper around the new object)
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="keyword">local</span> item = Moveable(
|
|
TEN.Objects.ObjID.PISTOLS_ITEM, <span class="comment">-- object id
|
|
</span> <span class="string">"test"</span>, <span class="comment">-- name
|
|
</span> Vec3(<span class="number">18907</span>, <span class="number">0</span>, <span class="number">21201</span>)) <span class="comment">-- position</span></pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetObjectID"></a>
|
|
<strong>Moveable:GetObjectID()</strong>
|
|
</dt>
|
|
<dd>
|
|
Retrieve the object ID
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
|
|
a number representing the ID of the object.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetObjectID"></a>
|
|
<strong>Moveable:SetObjectID(objectID)</strong>
|
|
</dt>
|
|
<dd>
|
|
Change the object's ID. This will literally change the object.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">objectID</span>
|
|
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
|
|
the new ID
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">shiva = TEN.Objects.GetMoveableByName(<span class="string">"shiva_60"</span>)
|
|
shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetOnHit"></a>
|
|
<strong>Moveable:SetOnHit(callback)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the name of the function to be called when the moveable is shot by Lara.
|
|
Note that this will be triggered twice when shot with both pistols at once.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">callback</span>
|
|
<span class="types"><span class="type">function</span></span>
|
|
function in LevelFuncs hierarchy to call when moveable is shot
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetOnKilled"></a>
|
|
<strong>Moveable:SetOnKilled(callback)</strong>
|
|
</dt>
|
|
<dd>
|
|
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.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">callback</span>
|
|
<span class="types"><span class="type">function</span></span>
|
|
function in LevelFuncs hierarchy to call when enemy is killed
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">LevelFuncs.baddyKilled = <span class="keyword">function</span>(theBaddy) <span class="global">print</span>(<span class="string">"You killed a baddy!"</span>) <span class="keyword">end</span>
|
|
baddy:SetOnKilled(LevelFuncs.baddyKilled)</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetOnCollidedWithObject"></a>
|
|
<strong>Moveable:SetOnCollidedWithObject(func)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the function to be called when this moveable collides with another moveable
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">func</span>
|
|
<span class="types"><span class="type">function</span></span>
|
|
callback function to be called (must be in LevelFuncs hierarchy). This function can take two arguments; these will store the two <a href="../2 classes/Objects.Moveable.html#Moveable">Moveable</a>s taking part in the collision.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="comment">-- obj1 is the collision moveable
|
|
</span><span class="comment">-- obj2 is the collider moveable
|
|
</span>
|
|
LevelFuncs.objCollided = <span class="keyword">function</span>(obj1, obj2)
|
|
<span class="global">print</span>(obj1:GetName() .. <span class="string">" collided with "</span> .. obj2:GetName())
|
|
<span class="keyword">end</span>
|
|
baddy:SetOnCollidedWithObject(LevelFuncs.objCollided)</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetOnCollidedWithRoom"></a>
|
|
<strong>Moveable:SetOnCollidedWithRoom(func)</strong>
|
|
</dt>
|
|
<dd>
|
|
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 <a href="../2 classes/Objects.Moveable.html#Moveable">Moveable</a> that collided with geometry.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">func</span>
|
|
<span class="types"><span class="type">function</span></span>
|
|
callback function to be called (must be in LevelFuncs hierarchy)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">LevelFuncs.roomCollided = <span class="keyword">function</span>(obj)
|
|
<span class="global">print</span>(obj:GetName() .. <span class="string">" collided with room geometry"</span>)
|
|
<span class="keyword">end</span>
|
|
baddy:SetOnCollidedWithRoom(LevelFuncs.roomCollided)</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetName"></a>
|
|
<strong>Moveable:GetName()</strong>
|
|
</dt>
|
|
<dd>
|
|
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.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
|
|
the moveable's name
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetName"></a>
|
|
<strong>Moveable:SetName(name)</strong>
|
|
</dt>
|
|
<dd>
|
|
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.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">name</span>
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
|
|
the new moveable's name
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
true if we successfully set the name, false otherwise (e.g. if another object has the name already)
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetPosition"></a>
|
|
<strong>Moveable:GetPosition()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the moveable's position
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
a copy of the moveable's position
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetPosition"></a>
|
|
<strong>Moveable:SetPosition(position, [updateRoom])</strong>
|
|
</dt>
|
|
<dd>
|
|
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.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">position</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
the new position of the moveable
|
|
</li>
|
|
<li><span class="parameter">updateRoom</span>
|
|
<span class="types"><span class="type">bool</span></span>
|
|
Will room changes be automatically detected? Set to false if you are using overlapping rooms (default: true)
|
|
<em>Optional.</em>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetJointPosition"></a>
|
|
<strong>Moveable:GetJointPosition(jointIndex, [offset])</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the moveable's joint position with an optional relative offset.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">jointIndex</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Index of a joint to get position.
|
|
</li>
|
|
<li><span class="parameter">offset</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
Offset relative to the joint.
|
|
<em>Optional.</em>
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
World position.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetJointRotation"></a>
|
|
<strong>Moveable:GetJointRotation(index)</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the object's joint rotation
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Index of a joint to get rotation.
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
|
|
a calculated copy of the moveable's joint rotation
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetRotation"></a>
|
|
<strong>Moveable:GetRotation()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the moveable's rotation.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
|
|
A copy of the moveable's rotation.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetScale"></a>
|
|
<strong>Moveable:GetScale()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the moveable's visual scale.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
A copy of the moveable's visual scale.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetRotation"></a>
|
|
<strong>Moveable:SetRotation(rotation)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the moveable's rotation.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">rotation</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
|
|
The moveable's new rotation
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetScale"></a>
|
|
<strong>Moveable:SetScale(scale)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the moveable's visual scale. Does not affect collision.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">scale</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
New visual scale.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetHP"></a>
|
|
<strong>Moveable:GetHP()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get current HP (hit points/health points)
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
the amount of HP the moveable currently has
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetHP"></a>
|
|
<strong>Moveable:SetHP(HP)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set current HP (hit points/health points)
|
|
Clamped to [0, 32767] for "intelligent" entities (i.e. anything with AI); clamped to [-32767, 32767] otherwise.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">HP</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
the amount of HP to give the moveable
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetSlotHP"></a>
|
|
<strong>Moveable:GetSlotHP()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get HP definded for that object type (hit points/health points) (Read Only).
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
the moveable's slot default hit points
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetOCB"></a>
|
|
<strong>Moveable:GetOCB()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get OCB (object code bit) of the moveable
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
the moveable's current OCB value
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetOCB"></a>
|
|
<strong>Moveable:SetOCB(OCB)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set OCB (object code bit) of the moveable
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">OCB</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
the new value for the moveable's OCB
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetEffect"></a>
|
|
<strong>Moveable:SetEffect(effect, [timeout])</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the effect for this moveable.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">effect</span>
|
|
<span class="types"><a class="type" href="../4 enums/Effects.EffectID.html#">EffectID</a></span>
|
|
Type of effect to assign.
|
|
</li>
|
|
<li><span class="parameter">timeout</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
time (in seconds) after which effect turns off.
|
|
<em>Optional.</em>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetCustomEffect"></a>
|
|
<strong>Moveable:SetCustomEffect(color1, color2, [timeout])</strong>
|
|
</dt>
|
|
<dd>
|
|
Set custom colored burn effect to moveable
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">color1</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
|
The primary color of the effect (also used for lighting).
|
|
</li>
|
|
<li><span class="parameter">color2</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
|
The secondary color of the effect.
|
|
</li>
|
|
<li><span class="parameter">timeout</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
Time (in seconds) after which effect turns off.
|
|
<em>Optional.</em>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetEffect"></a>
|
|
<strong>Moveable:GetEffect()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get current moveable effect
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../4 enums/Effects.EffectID.html#">EffectID</a></span>
|
|
Effect type currently assigned.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetItemFlags"></a>
|
|
<strong>Moveable:GetItemFlags(index)</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the value stored in ItemFlags[index]
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Index of the ItemFlag, can be between 0 and 7.
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
the value contained in the ItemFlags[index]
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetItemFlags"></a>
|
|
<strong>Moveable:SetItemFlags(value, index)</strong>
|
|
</dt>
|
|
<dd>
|
|
Stores a value in ItemFlags[index]
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">value</span>
|
|
<span class="types"><span class="type">short</span></span>
|
|
Value to store in the moveable's ItemFlags[index].
|
|
</li>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Index of the ItemFlag where to store the value.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetLocationAI"></a>
|
|
<strong>Moveable:GetLocationAI()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the location value stored in the Enemy AI
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">short</span></span>
|
|
the value contained in the LocationAI of the creature.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetLocationAI"></a>
|
|
<strong>Moveable:SetLocationAI(value)</strong>
|
|
</dt>
|
|
<dd>
|
|
Updates the location in the enemy AI with the given value.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">value</span>
|
|
<span class="types"><span class="type">short</span></span>
|
|
Value to store.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetColor"></a>
|
|
<strong>Moveable:GetColor()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the moveable's color
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
|
a copy of the moveable's color
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetColor"></a>
|
|
<strong>Moveable:SetColor(color)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the moveable's color
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">color</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
|
the new color of the moveable
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetAIBits"></a>
|
|
<strong>Moveable:GetAIBits()</strong>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>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
|
|
have a <em>1</em> in the corresponding cell. Otherwise, the cell will hold
|
|
a <em>0</em>.</p>
|
|
|
|
<pre><code>1 - Guard
|
|
2 - Ambush
|
|
3 - Patrol 1
|
|
4 - Modify
|
|
5 - Follow
|
|
6 - Patrol 2
|
|
</code></pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
|
|
a table of AI bits
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetAIBits"></a>
|
|
<strong>Moveable:SetAIBits(bits)</strong>
|
|
</dt>
|
|
<dd>
|
|
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.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">bits</span>
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
|
|
the table of AI bits
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="keyword">local</span> sas = TEN.Objects.GetMoveableByName(<span class="string">"sas_enemy"</span>)
|
|
sas:SetAIBits({<span class="number">1</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>})</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetState"></a>
|
|
<strong>Moveable:GetState()</strong>
|
|
</dt>
|
|
<dd>
|
|
Retrieve the index of the current state.
|
|
This corresponds to the number shown in the item's state ID field in WadTool.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
the index of the active state
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetTargetState"></a>
|
|
<strong>Moveable:GetTargetState()</strong>
|
|
</dt>
|
|
<dd>
|
|
Retrieve the index of the target state.
|
|
This corresponds to the state the object is trying to get into, which is sometimes different from the active state.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
the index of the target state
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetState"></a>
|
|
<strong>Moveable:SetState(index)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the object's state to the one specified by the given index.
|
|
Performs no bounds checking. <em>Ensure the number given is correct, else
|
|
object may end up in corrupted animation state.</em>
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
the index of the desired state
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetAnimSlot"></a>
|
|
<strong>Moveable:GetAnimSlot()</strong>
|
|
</dt>
|
|
<dd>
|
|
Retrieve the slot ID of the animation.
|
|
In certain cases, moveable may play animations from another object slot. Use this
|
|
function when you need to identify such cases.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
animation slot ID
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetAnim"></a>
|
|
<strong>Moveable:GetAnim()</strong>
|
|
</dt>
|
|
<dd>
|
|
Retrieve the index of the current animation.
|
|
This corresponds to the number shown in the item's animation list in WadTool.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
the index of the active animation
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetAnim"></a>
|
|
<strong>Moveable:SetAnim(index, [slot])</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the object's animation to the one specified by the given index.
|
|
Performs no bounds checking. <em>Ensure the number given is correct, else
|
|
object may end up in corrupted animation state.</em>
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
the index of the desired anim
|
|
</li>
|
|
<li><span class="parameter">slot</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
slot ID of the desired anim (if omitted, moveable's own slot ID is used)
|
|
<em>Optional.</em>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetFrame"></a>
|
|
<strong>Moveable:GetFrame()</strong>
|
|
</dt>
|
|
<dd>
|
|
Retrieve frame number.
|
|
This is the current frame of the object's active animation.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
the current frame of the active animation
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetVelocity"></a>
|
|
<strong>Moveable:GetVelocity()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the object's velocity.
|
|
In most cases, only Z and Y components are used as forward and vertical velocity.
|
|
In some cases, primarily NPCs, X component is used as side velocity.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
current object velocity
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetVelocity"></a>
|
|
<strong>Moveable:SetVelocity(velocity)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the object's velocity to specified value.
|
|
In most cases, only Z and Y components are used as forward and vertical velocity.
|
|
In some cases, primarily NPCs, X component is used as side velocity.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">velocity</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
velocity represented as vector
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetFrame"></a>
|
|
<strong>Moveable:SetFrame(frame)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set frame number.
|
|
This will move the animation to the given frame.
|
|
The number of frames in an animation can be seen under the heading "End frame" in
|
|
the WadTool animation editor. If the animation has no frames, the only valid argument
|
|
is -1.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">frame</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
the new frame number
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetEndFrame"></a>
|
|
<strong>Moveable:GetEndFrame()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the end frame number of the moveable's active animation.
|
|
This is the "End Frame" set in WADTool for the animation.()
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
End frame number of the active animation.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetActive"></a>
|
|
<strong>Moveable:GetActive()</strong>
|
|
</dt>
|
|
<dd>
|
|
Determine whether the moveable is active or not
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
true if the moveable is active
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetHitStatus"></a>
|
|
<strong>Moveable:GetHitStatus()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the hit status of the moveable.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
true if the moveable was hit by something in the last gameplay frame, false otherwise
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetRoom"></a>
|
|
<strong>Moveable:GetRoom()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the current room of the object
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../2 classes/Objects.Room.html#">Room</a></span>
|
|
current room of the object
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetRoomNumber"></a>
|
|
<strong>Moveable:GetRoomNumber()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the current room number of the object
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
number representing the current room of the object
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetRoomNumber"></a>
|
|
<strong>Moveable:SetRoomNumber(roomID)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the room ID of a moveable.
|
|
Use this if not using SetPosition's automatic room update - for example, when dealing with overlapping rooms.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">roomID</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
New room's ID.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example"><span class="keyword">local</span> sas = TEN.Objects.GetMoveableByName(<span class="string">"sas_enemy"</span>)
|
|
sas:SetRoomNumber(newRoomID)
|
|
sas:SetPosition(newPos, <span class="keyword">false</span>)</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetStatus"></a>
|
|
<strong>Moveable:GetStatus()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the moveable's status.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../4 enums/Objects.MoveableStatus.html#">MoveableStatus</a></span>
|
|
Status.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetStatus"></a>
|
|
<strong>Moveable:SetStatus(status)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the moveable's status.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">status</span>
|
|
<span class="types"><a class="type" href="../4 enums/Objects.MoveableStatus.html#">MoveableStatus</a></span>
|
|
The new status of the moveable.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetMeshCount"></a>
|
|
<strong>Moveable:GetMeshCount()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get number of meshes for a particular object
|
|
Returns number of meshes in an object
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">int</span></span>
|
|
number of meshes
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetMeshVisible"></a>
|
|
<strong>Moveable:GetMeshVisible(index)</strong>
|
|
</dt>
|
|
<dd>
|
|
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.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
index of a mesh
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
visibility status
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetMeshVisible"></a>
|
|
<strong>Moveable:SetMeshVisible(index, isVisible)</strong>
|
|
</dt>
|
|
<dd>
|
|
Makes specified mesh visible or invisible
|
|
Use this to show or hide a specified mesh of an object.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
index of a mesh
|
|
</li>
|
|
<li><span class="parameter">isVisible</span>
|
|
<span class="types"><span class="type">bool</span></span>
|
|
true if you want the mesh to be visible, false otherwise
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:ShatterMesh"></a>
|
|
<strong>Moveable:ShatterMesh(index)</strong>
|
|
</dt>
|
|
<dd>
|
|
Shatters specified mesh and makes it invisible
|
|
Note that you can re-enable mesh later by using SetMeshVisible().
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
index of a mesh
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetMeshSwapped"></a>
|
|
<strong>Moveable:GetMeshSwapped(index)</strong>
|
|
</dt>
|
|
<dd>
|
|
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.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
index of a mesh
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
mesh swap status
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SwapMesh"></a>
|
|
<strong>Moveable:SwapMesh(index, slotIndex, [swapIndex])</strong>
|
|
</dt>
|
|
<dd>
|
|
Set state of specified mesh swap of object
|
|
Use this to swap specified mesh of an object.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
index of a mesh
|
|
</li>
|
|
<li><span class="parameter">slotIndex</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
index of a slot to get meshswap from
|
|
</li>
|
|
<li><span class="parameter">swapIndex</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
index of a mesh from meshswap slot to use
|
|
<em>Optional.</em>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:UnswapMesh"></a>
|
|
<strong>Moveable:UnswapMesh(index)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set state of specified mesh swap of object
|
|
Use this to bring back original unswapped mesh
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">index</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
index of a mesh to unswap
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:Enable"></a>
|
|
<strong>Moveable:Enable(timeout)</strong>
|
|
</dt>
|
|
<dd>
|
|
Enable the item, as if a trigger for it had been stepped on.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">timeout</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
time (in seconds) after which moveable automatically disables (optional).
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:Disable"></a>
|
|
<strong>Moveable:Disable()</strong>
|
|
</dt>
|
|
<dd>
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:Explode"></a>
|
|
<strong>Moveable:Explode()</strong>
|
|
</dt>
|
|
<dd>
|
|
Explode this moveable. Also kills and disables it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:Shatter"></a>
|
|
<strong>Moveable:Shatter()</strong>
|
|
</dt>
|
|
<dd>
|
|
Shatter this moveable. Also kills and disables it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetCollidable"></a>
|
|
<strong>Moveable:GetCollidable()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the item's collision state.
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
item's collision state
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetCollidable"></a>
|
|
<strong>Moveable:SetCollidable(collidable)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the item's collision.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">collidable</span>
|
|
<span class="types"><span class="type">bool</span></span>
|
|
true if the caller should be collidable, false if no collision should occur.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:MakeInvisible"></a>
|
|
<strong>Moveable:MakeInvisible()</strong>
|
|
</dt>
|
|
<dd>
|
|
Make the item invisible. Alias for <code>Moveable:SetVisible(false)</code>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:SetVisible"></a>
|
|
<strong>Moveable:SetVisible(visible)</strong>
|
|
</dt>
|
|
<dd>
|
|
Set the item's visibility. <strong>An invisible item will have collision turned off, as if it no longer exists in the game world</strong>.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">visible</span>
|
|
<span class="types"><span class="type">bool</span></span>
|
|
true if the caller should become visible, false if it should become invisible
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:GetValid"></a>
|
|
<strong>Moveable:GetValid()</strong>
|
|
</dt>
|
|
<dd>
|
|
Test if the object is in a valid state (i.e. has not been destroyed through Lua or killed by Lara).
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
valid true if the object is still not destroyed
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:Destroy"></a>
|
|
<strong>Moveable:Destroy()</strong>
|
|
</dt>
|
|
<dd>
|
|
Destroy the moveable. This will mean it can no longer be used, except to re-initialize it with another object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:AttachObjCamera"></a>
|
|
<strong>Moveable:AttachObjCamera(mesh, target, mesh)</strong>
|
|
</dt>
|
|
<dd>
|
|
Attach camera to an object.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">mesh</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Mesh of a target moveable to use as a camera target.
|
|
</li>
|
|
<li><span class="parameter">target</span>
|
|
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#Moveable">Moveable</a></span>
|
|
Target moveable to attach camera to.
|
|
</li>
|
|
<li><span class="parameter">mesh</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Mesh of a target moveable to use as a camera target.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "Moveable:AnimFromObject"></a>
|
|
<strong>Moveable:AnimFromObject(objectID, animNumber, stateID)</strong>
|
|
</dt>
|
|
<dd>
|
|
Borrow animation from an object
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">objectID</span>
|
|
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
|
|
Object ID to take animation and stateID from.
|
|
</li>
|
|
<li><span class="parameter">animNumber</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Animation from object.
|
|
</li>
|
|
<li><span class="parameter">stateID</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
state State from object.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
</div> <!-- id="main" -->
|
|
<div id="about">
|
|
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|