Lua API documentation revisions (#1636)

* First iteration

* Revise Moveable class documentation

* Revise remaining documentation

* Extend laraType description

* Enum documentation revisions

* Edit version

* Corrections and updates

* Corrections
This commit is contained in:
Lwmte 2025-04-20 22:39:30 +03:00 committed by GitHub
parent cb23823e64
commit 7c2f6f96e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
102 changed files with 1614 additions and 1576 deletions

View file

@ -12,7 +12,7 @@ new_type("luautil", "5 Lua utility modules", true)
not_luadoc = true
local version = "1.8.1"
local version = "1.8.2"
project = " TombEngine"
title = "TombEngine " .. version .. " Lua API"
description = "TombEngine " .. version .. " scripting interface"

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -124,19 +124,19 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#EmitLightningArc">EmitLightningArc(origin, target, color, life, amplitude, beamWidth, detail, smooth, endDrift)</a></td>
<td class="name" ><a href="#EmitLightningArc">EmitLightningArc(origin, target, [color.], [life], [amplitude], [beamWidth], [detail], [smooth], [endDrift])</a></td>
<td class="summary">Emit a lightning arc.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitParticle">EmitParticle(pos, vel, spriteID, gravity, rotVel, startColor, endColor, blendMode, startSize, endSize, life, damage, poison, spriteSeqID, startRot)</a></td>
<td class="name" ><a href="#EmitParticle">EmitParticle(pos, vel, spriteID, [gravity], [rotVel], [startColor], [endColor], [blendMode], [startSize], [endSize], [life], [damage], [poison], [spriteSeqID], [startRot])</a></td>
<td class="summary">Emit a particle.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitAdvancedParticle">EmitAdvancedParticle(ParticleData)</a></td>
<td class="name" ><a href="#EmitAdvancedParticle">EmitAdvancedParticle(particleData)</a></td>
<td class="summary">Emit a particle with extensive configuration options, including sprite sequence animation, lights, sounds, and damage effects.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitShockwave">EmitShockwave(pos, innerRadius, outerRadius, color, lifetime, speed, angle, hurtsLara)</a></td>
<td class="name" ><a href="#EmitShockwave">EmitShockwave(pos, [innerRadius], [outerRadius], [color], [lifetime], [speed], [angle], [hurtsLara])</a></td>
<td class="summary">Emit a shockwave, similar to that seen when a harpy projectile hits something.</td>
</tr>
<tr>
@ -148,7 +148,7 @@
<td class="summary">Emit dynamic directional spotlight that lasts for a single frame.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitBlood">EmitBlood(pos, count)</a></td>
<td class="name" ><a href="#EmitBlood">EmitBlood(pos, [count])</a></td>
<td class="summary">Emit blood.</td>
</tr>
<tr>
@ -156,15 +156,15 @@
<td class="summary">Emit an air bubble in a water room.</td>
</tr>
<tr>
<td class="name" ><a href="#EmitFire">EmitFire(pos, size)</a></td>
<td class="name" ><a href="#EmitFire">EmitFire(pos, [size])</a></td>
<td class="summary">Emit fire for one frame.</td>
</tr>
<tr>
<td class="name" ><a href="#MakeExplosion">MakeExplosion(pos, size, shockwave)</a></td>
<td class="name" ><a href="#MakeExplosion">MakeExplosion(pos, [size], [shockwave])</a></td>
<td class="summary">Make an explosion.</td>
</tr>
<tr>
<td class="name" ><a href="#MakeEarthquake">MakeEarthquake(strength)</a></td>
<td class="name" ><a href="#MakeEarthquake">MakeEarthquake([strength])</a></td>
<td class="summary">Make an earthquake</td>
</tr>
<tr>
@ -193,7 +193,7 @@
<dl class="function">
<dt>
<a name = "EmitLightningArc"></a>
<strong>EmitLightningArc(origin, target, color, life, amplitude, beamWidth, detail, smooth, endDrift)</strong>
<strong>EmitLightningArc(origin, target, [color.], [life], [amplitude], [beamWidth], [detail], [smooth], [endDrift])</strong>
</dt>
<dd>
Emit a lightning arc.
@ -214,33 +214,42 @@
</li>
<li><span class="parameter">color</span>
<li><span class="parameter">color.</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
(default Color(255, 255, 255))
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">life</span>
<span class="types"><span class="type">float</span></span>
Lifetime in seconds. Clamped to [0, 4.233] for now because of strange internal maths. <strong>default: 1</strong>
Lifetime in seconds. Clamped to [0, 4.233] for now because of strange internal maths.
<em>Default: 1.</em>
</li>
<li><span class="parameter">amplitude</span>
<span class="types"><span class="type">int</span></span>
"strength" of the lightning - the higher the value, the "taller" the arcs. Clamped to [1, 255]. <strong>default: 20</strong>
Strength of the lightning - the higher the value, the "taller" the arcs. Clamped to [1, 255].
<em>Default: 20.</em>
</li>
<li><span class="parameter">beamWidth</span>
<span class="types"><span class="type">int</span></span>
Clamped to [1, 127]. <strong>default 2</strong>
Beam width. Clamped to [1, 127].
<em>Default: 2.</em>
</li>
<li><span class="parameter">detail</span>
<span class="types"><span class="type">int</span></span>
Higher numbers equal more segments, but it's not a 1:1 correlation. Clamped to [1, 127]. <strong>default: 10</strong>
Higher numbers equal more segments, but it's not a 1:1 correlation. Clamped to [1, 127].
<em>Default: 10.</em>
</li>
<li><span class="parameter">smooth</span>
<span class="types"><span class="type">bool</span></span>
If true, the arc will have large, smooth curves; if false, it will have small, jagged spikes. <strong>default: false</strong>
If true, the arc will have large, smooth curves; if false, it will have small, jagged spikes.
<em>Default: false.</em>
</li>
<li><span class="parameter">endDrift</span>
<span class="types"><span class="type">bool</span></span>
If true, the end of the arc will be able to gradually drift away from its destination in a random direction <strong>default: false</strong>
If true, the end of the arc will be able to gradually drift away from its destination in a random direction.
<em>Default: false.</em>
</li>
</ul>
@ -251,7 +260,7 @@
</dd>
<dt>
<a name = "EmitParticle"></a>
<strong>EmitParticle(pos, vel, spriteID, gravity, rotVel, startColor, endColor, blendMode, startSize, endSize, life, damage, poison, spriteSeqID, startRot)</strong>
<strong>EmitParticle(pos, vel, spriteID, [gravity], [rotVel], [startColor], [endColor], [blendMode], [startSize], [endSize], [life], [damage], [poison], [spriteSeqID], [startRot])</strong>
</dt>
<dd>
Emit a particle.
@ -274,51 +283,63 @@
</li>
<li><span class="parameter">gravity</span>
<span class="types"><span class="type">float</span></span>
Effect of gravity. Positive value ascends, negative value descends. <strong>default: 0</strong>
Effect of gravity. Positive value ascends, negative value descends.
<em>Default: 0.</em>
</li>
<li><span class="parameter">rotVel</span>
<span class="types"><span class="type">float</span></span>
Rotational velocity in degrees. <strong>default: 0</strong>
Rotational velocity in degrees.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at start of life. <strong>default: Color(255, 255, 255)</strong>
Color at start of life.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">endColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at end of life. This will finish long before the end of the particle's life due to internal math. <strong>default: Color(255, 255, 255)</strong>
Color at end of life. This will finish long before the end of the particle's life due to internal math.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">blendMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
Render blend mode. <strong>TEN.Effects.BlendID.ALPHA_BLEND</strong>
Render blend mode.
<em>Default: TEN.Effects.BlendID.ALPHA_BLEND.</em>
</li>
<li><span class="parameter">startSize</span>
<span class="types"><span class="type">float</span></span>
Size at start of life. <strong>default: 10</strong>
Size at start of life.
<em>Default: 10.</em>
</li>
<li><span class="parameter">endSize</span>
<span class="types"><span class="type">float</span></span>
Size at end of life. <strong>default: 0</strong>
Size at end of life.
<em>Default: 0.</em>
</li>
<li><span class="parameter">life</span>
<span class="types"><span class="type">float</span></span>
Lifespan in seconds. <strong>default: 2</strong>
Lifespan in seconds.
<em>Default: 2.</em>
</li>
<li><span class="parameter">damage</span>
<span class="types"><span class="type">bool</span></span>
Harm the player on collision. <strong>default: false</strong>
Harm the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">poison</span>
<span class="types"><span class="type">bool</span></span>
Poison the player on collision. <strong>default: false</strong>
Poison the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">spriteSeqID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
Sprite sequence slot ID. <strong>default: Objects.ObjID.DEFAULT_SPRITES</strong>
Sprite sequence slot ID.
<em>Default: Objects.ObjID.DEFAULT_SPRITES.</em>
</li>
<li><span class="parameter">startRot</span>
<span class="types"><span class="type">float</span></span>
Rotation at start of life. <strong>default: random</strong>
Rotation at start of life.
<em>Default: random.</em>
</li>
</ul>
@ -348,7 +369,7 @@
</dd>
<dt>
<a name = "EmitAdvancedParticle"></a>
<strong>EmitAdvancedParticle(ParticleData)</strong>
<strong>EmitAdvancedParticle(particleData)</strong>
</dt>
<dd>
Emit a particle with extensive configuration options, including sprite sequence animation, lights, sounds, and damage effects.
@ -357,7 +378,7 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ParticleData</span>
<li><span class="parameter">particleData</span>
<span class="types"><a class="type" href="../1 modules/Effects.html#ParticleData">ParticleData</a></span>
Table containing particle data.
</li>
@ -404,7 +425,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "EmitShockwave"></a>
<strong>EmitShockwave(pos, innerRadius, outerRadius, color, lifetime, speed, angle, hurtsLara)</strong>
<strong>EmitShockwave(pos, [innerRadius], [outerRadius], [color], [lifetime], [speed], [angle], [hurtsLara])</strong>
</dt>
<dd>
Emit a shockwave, similar to that seen when a harpy projectile hits something.
@ -415,35 +436,42 @@ EmitAdvancedParticle(particle)</pre>
<ul>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Origin position
Origin Position.
</li>
<li><span class="parameter">innerRadius</span>
<span class="types"><span class="type">int</span></span>
(default 0) Initial inner radius of the shockwave circle - 128 will be approx a click, 512 approx a block
Initial inner radius of the shockwave circle - 128 will be approx a click, 512 approx a block.
<em>Default: 0.</em>
</li>
<li><span class="parameter">outerRadius</span>
<span class="types"><span class="type">int</span></span>
(default 128) Initial outer radius of the shockwave circle
Initial outer radius of the shockwave circle.
<em>Default: 128.</em>
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
(default Color(255, 255, 255))
Color.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">lifetime</span>
<span class="types"><span class="type">float</span></span>
(default 1.0) Lifetime in seconds (max 8.5 because of inner maths weirdness)
Lifetime in seconds (max 8.5 because of inner maths weirdness).
<em>Default: 1.0.</em>
</li>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">int</span></span>
(default 50) Initial speed of the shockwave's expansion (the shockwave will always slow as it goes)
Initial speed of the shockwave's expansion (the shockwave will always slow as it goes).
<em>Default: 50.</em>
</li>
<li><span class="parameter">angle</span>
<span class="types"><span class="type">int</span></span>
(default 0) Angle about the X axis - a value of 90 will cause the shockwave to be entirely vertical
Angle about the X axis - a value of 90 will cause the shockwave to be entirely vertical.
<em>Default: 0.</em>
</li>
<li><span class="parameter">hurtsLara</span>
<span class="types"><span class="type">bool</span></span>
(default false) If true, the shockwave will hurt Lara, with the damage being relative to the shockwave's current speed
If true, the shockwave will hurt Lara, with the damage being relative to the shockwave's current speed.
<em>Default: false.</em>
</li>
</ul>
@ -470,22 +498,22 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
light color (default Color(255, 255, 255))
<em>Optional.</em>
light color.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">radius</span>
<span class="types"><span class="type">int</span></span>
measured in "clicks" or 256 world units (default 20)
<em>Optional.</em>
Measured in "clicks" or 256 world units.
<em>Default: 20.</em>
</li>
<li><span class="parameter">shadows</span>
<span class="types"><span class="type">bool</span></span>
determines whether light should generate dynamic shadows for applicable moveables (default is false)
<em>Optional.</em>
Determines whether light should generate dynamic shadows for applicable moveables.
<em>Default: false.</em>
</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>
if provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights)
If provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights).
<em>Optional.</em>
</li>
</ul>
@ -517,32 +545,32 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
(default Color(255, 255, 255))
<em>Optional.</em>
Color.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">radius</span>
<span class="types"><span class="type">int</span></span>
overall radius at the endpoint of a light cone, measured in "clicks" or 256 world units (default 10)
<em>Optional.</em>
Overall radius at the endpoint of a light cone, measured in "clicks" or 256 world units.
<em>Default: 10.</em>
</li>
<li><span class="parameter">falloff</span>
<span class="types"><span class="type">int</span></span>
radius, at which light starts to fade out, measured in "clicks" (default 5)
<em>Optional.</em>
Radius, at which light starts to fade out, measured in "clicks".
<em>Default: 5.</em>
</li>
<li><span class="parameter">distance</span>
<span class="types"><span class="type">int</span></span>
distance, at which light cone fades out, measured in "clicks" (default 20)
<em>Optional.</em>
Distance, at which light cone fades out, measured in "clicks".
<em>Default: 20.</em>
</li>
<li><span class="parameter">shadows</span>
<span class="types"><span class="type">bool</span></span>
determines whether light should generate dynamic shadows for applicable moveables (default is false)
<em>Optional.</em>
Determines whether light should generate dynamic shadows for applicable moveables.
<em>Default: false.</em>
</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>
if provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights)
If provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights).
<em>Optional.</em>
</li>
</ul>
@ -554,7 +582,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "EmitBlood"></a>
<strong>EmitBlood(pos, count)</strong>
<strong>EmitBlood(pos, [count])</strong>
</dt>
<dd>
Emit blood.
@ -571,7 +599,8 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">count</span>
<span class="types"><span class="type">int</span></span>
Sprite count. <strong>default: 1</strong>
Sprite count.
<em>Default: 1.</em>
</li>
</ul>
@ -597,13 +626,13 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">size</span>
<span class="types"><span class="type">float</span></span>
Sprite size. <strong>Default: 32</strong>
<em>Optional.</em>
Sprite size.
<em>Default: 32.</em>
</li>
<li><span class="parameter">amp</span>
<span class="types"><span class="type">float</span></span>
Oscillation amplitude. <strong>Default: 32</strong>
<em>Optional.</em>
Oscillation amplitude.
<em>Default: 32.</em>
</li>
</ul>
@ -614,7 +643,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "EmitFire"></a>
<strong>EmitFire(pos, size)</strong>
<strong>EmitFire(pos, [size])</strong>
</dt>
<dd>
Emit fire for one frame. Will not hurt player. Call this each frame if you want a continuous fire.
@ -625,13 +654,12 @@ EmitAdvancedParticle(particle)</pre>
<ul>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Position.
</li>
<li><span class="parameter">size</span>
<span class="types"><span class="type">float</span></span>
Fire size. <strong>default: 1</strong>
Fire size.
<em>Default: 1.</em>
</li>
</ul>
@ -642,7 +670,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "MakeExplosion"></a>
<strong>MakeExplosion(pos, size, shockwave)</strong>
<strong>MakeExplosion(pos, [size], [shockwave])</strong>
</dt>
<dd>
Make an explosion. Does not hurt Lara
@ -659,11 +687,13 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">size</span>
<span class="types"><span class="type">float</span></span>
(default 512.0) this will not be the size of the sprites, but rather the distance between the origin and any additional sprites
This will not be the size of the sprites, but rather the distance between the origin and any additional sprites.
<em>Default: 512.</em>
</li>
<li><span class="parameter">shockwave</span>
<span class="types"><span class="type">bool</span></span>
(default false) if true, create a very faint white shockwave which will not hurt Lara
If true, create a very faint white shockwave which will not hurt Lara.
<em>Default: false.</em>
</li>
</ul>
@ -674,7 +704,7 @@ EmitAdvancedParticle(particle)</pre>
</dd>
<dt>
<a name = "MakeEarthquake"></a>
<strong>MakeEarthquake(strength)</strong>
<strong>MakeEarthquake([strength])</strong>
</dt>
<dd>
Make an earthquake
@ -685,7 +715,8 @@ EmitAdvancedParticle(particle)</pre>
<ul>
<li><span class="parameter">strength</span>
<span class="types"><span class="type">int</span></span>
(default 100) How strong should the earthquake be? Increasing this value also increases the lifespan of the earthquake.
How strong should the earthquake be? Increasing this value also increases the lifespan of the earthquake.
<em>Default: 100.</em>
</li>
</ul>
@ -732,8 +763,8 @@ EmitAdvancedParticle(particle)</pre>
Moveable object with which to associate the effect.
</li>
<li><span class="parameter">tag</span>
<span class="types"><span class="type">int[opt]</span></span>
Numeric tag with which to associate the effect on the moveable. <strong>Default: 0</strong>
<span class="types"><span class="type">int</span></span>
Numeric tag with which to associate the effect on the moveable.
</li>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
@ -745,58 +776,58 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">rot</span>
<span class="types"><span class="type">float</span></span>
Start rotation in degrees. <strong>Default: 0</strong>
<em>Optional.</em>
Start rotation in degrees.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at the start of life. <strong>Default: Color(255, 255, 255, 255))</strong>
<em>Optional.</em>
Color at the start of life.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">endColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at the end of life. <strong>Default: Color(0, 0, 0, 0))</strong>
<em>Optional.</em>
Color at the end of life.
<em>Default: Color(0&#44; 0&#44; 0).</em>
</li>
<li><span class="parameter">width</span>
<span class="types"><span class="type">float</span></span>
Width in world units. <strong>Default: 0</strong>
<em>Optional.</em>
Width in world units.
<em>Default: 0.</em>
</li>
<li><span class="parameter">life</span>
<span class="types"><span class="type">float</span></span>
Lifetime in seconds. <strong>Default: 1</strong>
<em>Optional.</em>
Lifetime in seconds.
<em>Default: 1.</em>
</li>
<li><span class="parameter">vel</span>
<span class="types"><span class="type">float</span></span>
Movement velocity in world units per second. <strong>Default: 0</strong>
<em>Optional.</em>
Movement velocity in world units per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">expRate</span>
<span class="types"><span class="type">float</span></span>
Width expansion rate in world units per second. <strong>Default: 0</strong>
<em>Optional.</em>
Width expansion rate in world units per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">rotRate</span>
<span class="types"><span class="type">float</span></span>
Rotation rate in degrees per second. <strong>Default: 0</strong>
<em>Optional.</em>
Rotation rate in degrees per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">edgeFeatherMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.StreamerFeatherMode.html#">StreamerFeatherMode</a></span>
Edge feather mode. <strong>Default: Effects.StreamerFeatherMode.NONE</strong>
<em>Optional.</em>
Edge feather mode.
<em>Default: Effects.StreamerFeatherMode.NONE.</em>
</li>
<li><span class="parameter">lengthFeatherMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.StreamerFeatherMode.html#">StreamerFeatherMode</a></span>
Length feather mode. <strong>UNIMPLEMENTED, currently will always leave a fading tail</strong>
<em>Optional.</em>
Length feather mode. <em>Not yet implemented.</em>
<em>Default: Effects.StreamerFeatherMode.LEFT.</em>
</li>
<li><span class="parameter">blendID</span>
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
Renderer blend ID. <strong>Default: Effects.BlendID.ALPHA_BLEND</strong>
<em>Optional.</em>
Renderer blend ID.
<em>Default: Effects.BlendID.ALPHA_BLEND.</em>
</li>
</ul>
@ -830,128 +861,128 @@ EmitAdvancedParticle(particle)</pre>
</li>
<li><span class="parameter">spriteSeqID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
Sprite sequence slot ID. <strong>default: Objects.ObjID.DEFAULT_SPRITES</strong>
<em>Optional.</em>
Sprite sequence slot ID.
<em>Default: Objects.ObjID.DEFAULT_SPRITES.</em>
</li>
<li><span class="parameter">spriteID</span>
<span class="types"><span class="type">int</span></span>
Sprite ID in the sprite sequence slot. <strong>default: 0</strong>
<em>Optional.</em>
Sprite ID in the sprite sequence slot.
<em>Default: 0.</em>
</li>
<li><span class="parameter">life</span>
<span class="types"><span class="type">float</span></span>
Lifespan in seconds. <strong>default: 2</strong>
<em>Optional.</em>
Lifespan in seconds.
<em>Default: 2.</em>
</li>
<li><span class="parameter">maxYVel</span>
<span class="types"><span class="type">float</span></span>
Maximum vertical velocity in world units per second. <strong>default: 0</strong>
<em>Optional.</em>
Maximum vertical velocity in world units per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">gravity</span>
<span class="types"><span class="type">float</span></span>
Effect of gravity in world units per second. Positive value ascend, negative value descend. <strong>default: 0</strong>
<em>Optional.</em>
Effect of gravity in world units per second. Positive value ascend, negative value descend.
<em>Default: 0.</em>
</li>
<li><span class="parameter">friction</span>
<span class="types"><span class="type">float</span></span>
Friction affecting velocity over time in world units per second. <strong>default: 0</strong>
<em>Optional.</em>
Friction affecting velocity over time in world units per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startRot</span>
<span class="types"><span class="type">float</span></span>
Rotation at start of life. <strong>default: random</strong>
<em>Optional.</em>
Rotation at start of life.
<em>Default: random.</em>
</li>
<li><span class="parameter">rotVel</span>
<span class="types"><span class="type">float</span></span>
Rotational velocity in degrees per second. <strong>default: 0</strong>
<em>Optional.</em>
Rotational velocity in degrees per second.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startSize</span>
<span class="types"><span class="type">float</span></span>
Size at start of life. <strong>default: 10</strong>
<em>Optional.</em>
Size at start of life.
<em>Default: 10.</em>
</li>
<li><span class="parameter">endSize</span>
<span class="types"><span class="type">float</span></span>
Size at end of life. <strong>default: 0</strong>
<em>Optional.</em>
Size at end of life.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at start of life. <strong>default: Color(255, 255, 255)</strong>
<em>Optional.</em>
Color at start of life.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">endColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color at end of life. Note that this will finish long before the end of life due to internal math. <strong>default: Color(255, 255, 255)</strong>
<em>Optional.</em>
Color at end of life. Note that this will finish long before the end of life due to internal math.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">blendMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
Render blend mode. <strong>default: TEN.Effects.BlendID.ALPHA_BLEND</strong>
<em>Optional.</em>
Render blend mode.
<em>Default: TEN.Effects.BlendID.ALPHA_BLEND.</em>
</li>
<li><span class="parameter">damage</span>
<span class="types"><span class="type">bool</span></span>
Harm the player on collision. <strong>default: false</strong>
<em>Optional.</em>
Harm the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">poison</span>
<span class="types"><span class="type">bool</span></span>
Poison the player on collision. <strong>default: false</strong>
<em>Optional.</em>
Poison the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">burn</span>
<span class="types"><span class="type">bool</span></span>
Burn the player on collision. <strong>default: false</strong>
<em>Optional.</em>
Burn the player on collision.
<em>Default: false.</em>
</li>
<li><span class="parameter">wind</span>
<span class="types"><span class="type">bool</span></span>
Affect position by wind in outside rooms. <strong>default: false</strong>
<em>Optional.</em>
Affect position by wind in outside rooms.
<em>Default: false.</em>
</li>
<li><span class="parameter">damageHit</span>
<span class="types"><span class="type">int</span></span>
Player damage amount on collision. <strong>default: 2</strong>
<em>Optional.</em>
Player damage amount on collision.
<em>Default: 2.</em>
</li>
<li><span class="parameter">light</span>
<span class="types"><span class="type">bool</span></span>
Emit a colored light. CAUTION: Recommended only for a single particle. Too many particles with lights can overwhelm the lighting system. <strong>default: false</strong>
<em>Optional.</em>
Emit a colored light. <strong>Caution</strong>: Recommended only for a single particle. Too many particles with lights can overwhelm the lighting system.
<em>Default: false.</em>
</li>
<li><span class="parameter">lightRadius</span>
<span class="types"><span class="type">int</span></span>
Light radius in 1/4 blocks. <strong>default: 0</strong>
<em>Optional.</em>
Light radius in 1/4 blocks.
<em>Default: 0.</em>
</li>
<li><span class="parameter">lightFlicker</span>
<span class="types"><span class="type">int</span></span>
Interval at which the light should flicker. <strong>default: 0</strong>
<em>Optional.</em>
Interval at which the light should flicker.
<em>Default: 0.</em>
</li>
<li><span class="parameter">soundID</span>
<span class="types"><span class="type">int</span></span>
Sound ID to play. CAUTION: Recommended only for a single particle. Too many particles with sounds can overwhelm the sound system. <strong>default: none</strong>
Sound ID to play. <strong>Caution</strong>: Recommended only for a single particle. Too many particles with sounds can overwhelm the sound system.
<em>Optional.</em>
</li>
<li><span class="parameter">animated</span>
<span class="types"><span class="type">bool</span></span>
Play animates sprite sequence. <strong>default: false</strong>
<em>Optional.</em>
Play animates sprite sequence.
<em>Default: false.</em>
</li>
<li><span class="parameter">animType</span>
<span class="types"><a class="type" href="../4 enums/Effects.ParticleAnimationType.html#">ParticleAnimationType</a></span>
Animation type of the sprite sequence. <strong>default: TEN.Effects.ParticleAnimationType.LOOP</strong>
<em>Optional.</em>
Animation type of the sprite sequence.
<em>Default: TEN.Effects.ParticleAnimationType.LOOP.</em>
</li>
<li><span class="parameter">frameRate</span>
<span class="types"><span class="type">float</span></span>
Sprite sequence animation framerate. <strong>default: 1</strong>
<em>Optional.</em>
Sprite sequence animation framerate.
<em>Default: 1.</em>
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -183,11 +183,11 @@ scripts too.</p>
<td class="summary">Finishes the current level, with optional level index and start position index provided.</td>
</tr>
<tr>
<td class="name" ><a href="#GetStatistics">GetStatistics(game)</a></td>
<td class="name" ><a href="#GetStatistics">GetStatistics([game])</a></td>
<td class="summary">Get game or level statistics.</td>
</tr>
<tr>
<td class="name" ><a href="#SetStatistics">SetStatistics(statistics, game)</a></td>
<td class="name" ><a href="#SetStatistics">SetStatistics(statistics, [game])</a></td>
<td class="summary">Set game or level statistics.</td>
</tr>
<tr>
@ -265,11 +265,11 @@ scripts too.</p>
<td class="summary">Set string variable keys and their translations.</td>
</tr>
<tr>
<td class="name" ><a href="#GetString">GetString(string)</a></td>
<td class="name" ><a href="#GetString">GetString(key)</a></td>
<td class="summary">Get translated string.</td>
</tr>
<tr>
<td class="name" ><a href="#IsStringPresent">IsStringPresent(string)</a></td>
<td class="name" ><a href="#IsStringPresent">IsStringPresent(key)</a></td>
<td class="summary">Check if translated string is present.</td>
</tr>
<tr>
@ -303,7 +303,7 @@ ambient tracks.
<ul>
<li><span class="parameter">level</span>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
a level object
A level object.
</li>
</ul>
@ -317,8 +317,7 @@ ambient tracks.
<strong>SetIntroImagePath(path)</strong>
</dt>
<dd>
Image to show when loading the game.
Must be a .jpg or .png image.
Image to show when loading the game. Must be a .jpg or .png image.
@ -326,7 +325,7 @@ Must be a .jpg or .png image.
<ul>
<li><span class="parameter">path</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the path to the image, relative to the TombEngine exe
The path to the image, relative to the TombEngine executable.
</li>
</ul>
@ -340,8 +339,7 @@ Must be a .jpg or .png image.
<strong>SetIntroVideoPath(path)</strong>
</dt>
<dd>
Video to show when loading the game.
Must be a common video format, such as .mp4, .mkv or .avi.
Video to show when loading the game. Must be a common video format, such as mp4, mkv, mov or avi.
@ -363,9 +361,7 @@ Must be a common video format, such as .mp4, .mkv or .avi.
<strong>SetTitleScreenImagePath(path)</strong>
</dt>
<dd>
Image to show in the background of the title screen.
Must be a .jpg or .png image.
<strong>(not yet implemented)</strong>
Image to show in the background of the title screen. Must be a .jpg or .png image. <em>Not yet implemented.</em>
@ -373,7 +369,7 @@ Must be a .jpg or .png image.
<ul>
<li><span class="parameter">path</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the path to the image, relative to the TombEngine exe
The path to the image, relative to the TombEngine executable.
</li>
</ul>
@ -396,7 +392,7 @@ Must be true or false
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
True or false.
</li>
</ul>
@ -419,7 +415,7 @@ Must be true or false
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
True or false.
</li>
</ul>
@ -433,7 +429,7 @@ Must be true or false
<strong>EnableHomeLevel(enabled)</strong>
</dt>
<dd>
Enable or disable Home Level entry in the main menu. ()
Enable or disable Home Level entry in the main menu.
@ -455,7 +451,7 @@ Must be true or false
<strong>EnableLoadSave(enabled)</strong>
</dt>
<dd>
Enable or disable saving and loading of savegames. ()
Enable or disable saving and loading of savegames.
@ -481,7 +477,7 @@ Must be true or false
<strong>EnableFlyCheat(enabled)</strong>
</dt>
<dd>
Enable or disable the fly cheat. ()
Enable or disable the fly cheat.
@ -512,7 +508,7 @@ Must be true or false
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
True or false.
</li>
</ul>
@ -535,7 +531,7 @@ Must be true or false
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
True or false.
</li>
</ul>
@ -551,7 +547,7 @@ Must be true or false
<dd>
Returns the level by index.
Indices depend on the order in which AddLevel was called; the first added will
have an ID of 0, the second an ID of 1, and so on.
have an index of 0, the second an index of 1, and so on.
@ -559,7 +555,7 @@ have an ID of 0, the second an ID of 1, and so on.
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
of the level
Index of the level.
</li>
</ul>
@ -567,7 +563,7 @@ have an ID of 0, the second an ID of 1, and so on.
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
the level indicated by the id
The level indicated by the index.
</ol>
@ -588,7 +584,7 @@ have an ID of 0, the second an ID of 1, and so on.
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
the current level
The current level.
</ol>
@ -611,13 +607,13 @@ teleported to such object with OCB similar to provided second argument.
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
level index (default 0)
<em>Optional.</em>
Level index.
<em>Default: 0.</em>
</li>
<li><span class="parameter">startPos</span>
<span class="types"><span class="type">int</span></span>
player start position (default 0)
<em>Optional.</em>
Player start position in the next level. Should correspond to OCB of <code>Objects.ObjID.LARA_START_POS</code> object in the next level.
<em>Default: 0.</em>
</li>
</ul>
@ -628,7 +624,7 @@ teleported to such object with OCB similar to provided second argument.
</dd>
<dt>
<a name = "GetStatistics"></a>
<strong>GetStatistics(game)</strong>
<strong>GetStatistics([game])</strong>
</dt>
<dd>
Get game or level statistics. For reference about statistics class, see <a href="../2 classes/Flow.Statistics.html#">Flow.Statistics</a>.
@ -639,7 +635,8 @@ teleported to such object with OCB similar to provided second argument.
<ul>
<li><span class="parameter">game</span>
<span class="types"><span class="type">bool</span></span>
if true, returns overall game statistics, otherwise returns current level statistics (default: false)
If true, returns overall game statistics, otherwise returns current level statistics.
<em>Default: false.</em>
</li>
</ul>
@ -647,7 +644,7 @@ teleported to such object with OCB similar to provided second argument.
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Statistics.html#">Statistics</a></span>
statistics structure representing game or level statistics
Statistics structure representing game or level statistics.
</ol>
@ -656,7 +653,7 @@ teleported to such object with OCB similar to provided second argument.
</dd>
<dt>
<a name = "SetStatistics"></a>
<strong>SetStatistics(statistics, game)</strong>
<strong>SetStatistics(statistics, [game])</strong>
</dt>
<dd>
Set game or level statistics. For reference about statistics class, see <a href="../2 classes/Flow.Statistics.html#">Flow.Statistics</a>.
@ -667,11 +664,12 @@ teleported to such object with OCB similar to provided second argument.
<ul>
<li><span class="parameter">statistics</span>
<span class="types"><a class="type" href="../2 classes/Flow.Statistics.html#">Statistics</a></span>
statistic object to set
Statistic object to set.
</li>
<li><span class="parameter">game</span>
<span class="types"><span class="type">bool</span></span>
if true, sets overall game statistics, otherwise sets current level statistics (default: false)
If true, sets overall game statistics, otherwise sets current level statistics.
<em>Default: false.</em>
</li>
</ul>
@ -694,7 +692,7 @@ teleported to such object with OCB similar to provided second argument.
<ol>
<span class="types"><a class="type" href="../4 enums/Flow.GameStatus.html#">GameStatus</a></span>
the current game status
The current game status.
</ol>
@ -715,7 +713,7 @@ teleported to such object with OCB similar to provided second argument.
<ol>
<span class="types"><a class="type" href="../4 enums/Flow.FreezeMode.html#">FreezeMode</a></span>
the current freeze mode
The current freeze mode.
</ol>
@ -737,7 +735,7 @@ custom menu creation, photo mode or time freeze.
<ul>
<li><span class="parameter">freezeMode</span>
<span class="types"><a class="type" href="../4 enums/Flow.FreezeMode.html#">FreezeMode</a></span>
new freeze mode to set.
New freeze mode to set.
</li>
</ul>
@ -874,7 +872,7 @@ custom menu creation, photo mode or time freeze.
<ul>
<li><span class="parameter">count</span>
<span class="types"><span class="type">int</span></span>
new secret count.
New secret count.
</li>
</ul>
@ -897,7 +895,7 @@ The index argument corresponds to the secret's unique ID, the same that would go
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
an index of current level's secret (must be from 0 to 31).
An index of current level's secret (must be from 0 to 31).
</li>
</ul>
@ -1021,7 +1019,7 @@ Must be an integer value (0 means no secrets).
<ul>
<li><span class="parameter">settings</span>
<span class="types"><a class="type" href="../2 classes/Flow.Settings.html#">Settings</a></span>
a settings table
A settings table.
</li>
</ul>
@ -1044,7 +1042,7 @@ Must be an integer value (0 means no secrets).
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Settings.html#">Settings</a></span>
current settings table
Current settings table.
</ol>
@ -1056,8 +1054,7 @@ Must be an integer value (0 means no secrets).
<div class="section-description">
These functions used in strings.lua, which is generated by TombIDE.
You will not need to call them manually.
These functions used in strings.lua, which is generated by TombIDE. You will not need to call them manually.
</div>
<dl class="function">
<dt>
@ -1072,8 +1069,8 @@ You will not need to call them manually.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
<span class="types"><span class="type">tab</span></span>
array-style table with strings
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
Array-style table with strings.
</li>
</ul>
@ -1084,7 +1081,7 @@ You will not need to call them manually.
</dd>
<dt>
<a name = "GetString"></a>
<strong>GetString(string)</strong>
<strong>GetString(key)</strong>
</dt>
<dd>
Get translated string.
@ -1093,9 +1090,9 @@ You will not need to call them manually.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<span class="types"><span class="type">key</span></span>
key for translated string
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
Key for translated string.
</li>
</ul>
@ -1106,7 +1103,7 @@ You will not need to call them manually.
</dd>
<dt>
<a name = "IsStringPresent"></a>
<strong>IsStringPresent(string)</strong>
<strong>IsStringPresent(key)</strong>
</dt>
<dd>
Check if translated string is present.
@ -1115,9 +1112,9 @@ You will not need to call them manually.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<span class="types"><span class="type">key</span></span>
key for translated string
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
Key for translated string.
</li>
</ul>
@ -1139,8 +1136,8 @@ Specify which translations in the strings table correspond to which languages.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
<span class="types"><span class="type">tab</span></span>
array-style table with language names
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
Array-style table with language names.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -295,7 +295,7 @@
<strong>GetMouseDisplayPosition()</strong>
</dt>
<dd>
Get the display position of the cursor in percent. ()
Get the display position of the cursor in percent.

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -132,7 +132,7 @@
<td class="summary">Deregister a function as a callback.</td>
</tr>
<tr>
<td class="name" ><a href="#HandleEvent">HandleEvent(name, type, activator)</a></td>
<td class="name" ><a href="#HandleEvent">HandleEvent(name, type, [activator])</a></td>
<td class="summary">Attempt to find an event set and execute a particular event from it.</td>
</tr>
<tr>
@ -148,7 +148,7 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#Lara">Lara</a></td>
<td class="summary">A <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> representing Lara herself.</td>
<td class="summary">An <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> entry representing Lara herself.</td>
</tr>
</table>
<h2><a href="#Special_tables">Special tables </a></h2>
@ -272,7 +272,7 @@ Will have no effect if the function was not registered as a callback
</dd>
<dt>
<a name = "HandleEvent"></a>
<strong>HandleEvent(name, type, activator)</strong>
<strong>HandleEvent(name, type, [activator])</strong>
</dt>
<dd>
Attempt to find an event set and execute a particular event from it.
@ -302,7 +302,8 @@ MENU</pre>
</li>
<li><span class="parameter">activator</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
Optional activator. Default is the player object.
Optional activator.
<em>Default: Lara.</em>
</li>
</ul>
@ -372,7 +373,7 @@ MENU</pre>
<strong>Lara</strong>
</dt>
<dd>
A <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> representing Lara herself.
An <a href="../2 classes/Objects.Moveable.html#">Objects.Moveable</a> entry representing Lara herself.

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -189,14 +189,14 @@
<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 unique name of the Moveable as set in, or generated by, Tomb Editor
The unique name of the moveable as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Moveable</span></span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
a non-owning Moveable referencing the item.
</ol>
@ -217,15 +217,15 @@
<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 unique name of the mesh as set in, or generated by, Tomb Editor
The unique name of the static mesh as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Static</span></span>
a non-owning Static referencing the mesh.
<span class="types"><a class="type" href="../2 classes/Objects.Static.html#">Static</a></span>
a non-owning Static referencing the static mesh.
</ol>
@ -245,7 +245,7 @@
<ul>
<li><span class="parameter">slot</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
the unique slot of the Moveable, e.g. <code>Objects.ObjID.ANIMATING1</code>
The unique slot of the moveable, e.g. <code>Objects.ObjID.ANIMATING1</code>.
</li>
</ul>
@ -253,7 +253,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
table of Moveables referencing the given slot.
Table of moveables referencing the given slot.
</ol>
@ -273,7 +273,7 @@
<ul>
<li><span class="parameter">slot</span>
<span class="types"><span class="type">int</span></span>
the unique slot of the mesh like 10
The unique numerical slot of the static mesh.
</li>
</ul>
@ -281,7 +281,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
table of Statics referencing the given slot ID.
Table of static meshes referencing the given slot.
</ol>
@ -301,7 +301,7 @@
<ul>
<li><span class="parameter">tag</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
to select rooms by
Tag to select rooms by.
</li>
</ul>
@ -309,7 +309,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
table of Rooms containing the given tag.
Table of rooms containing the given tag.
</ol>
@ -329,15 +329,15 @@
<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 unique name of the camera as set in, or generated by, Tomb Editor
The unique name of the camera as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Camera</span></span>
a non-owning Camera referencing the camera.
<span class="types"><a class="type" href="../2 classes/Objects.Camera.html#">Camera</a></span>
A non-owning Camera referencing the camera.
</ol>
@ -357,15 +357,15 @@
<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 unique name of the sink as set in, or generated by, Tomb Editor
The unique name of the sink as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Sink</span></span>
a non-owning Sink referencing the sink.
<span class="types"><a class="type" href="../2 classes/Objects.Sink.html#">Sink</a></span>
A non-owning Sink referencing the sink.
</ol>
@ -385,15 +385,15 @@
<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 unique name of the sound source as set in, or generated by, Tomb Editor
The unique name of the sound source as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">SoundSource</span></span>
a non-owning SoundSource referencing the sound source.
<span class="types"><a class="type" href="../2 classes/Objects.SoundSource.html#">SoundSource</a></span>
A non-owning SoundSource referencing the sound source.
</ol>
@ -413,15 +413,15 @@
<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 unique name of the AIObject as set in, or generated by, Tomb Editor
The unique name of the AIObject as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">AIObject</span></span>
a non-owning SoundSource referencing the AI moveable.
<span class="types"><a class="type" href="../2 classes/Objects.AIObject.html#">AIObject</a></span>
A non-owning AIObject referencing the AI object.
</ol>
@ -441,15 +441,15 @@
<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 unique name of the volume as set in, or generated by, Tomb Editor
The unique name of the volume as set in, or generated by, Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Volume</span></span>
a non-owning Volume referencing the room.
<span class="types"><a class="type" href="../2 classes/Objects.Volume.html#">Volume</a></span>
A non-owning Volume referencing the volume.
</ol>
@ -469,15 +469,15 @@
<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 unique name of the room as set in Tomb Editor
The unique name of the room as set in Tomb Editor.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Room</span></span>
a non-owning Room referencing the room.
<span class="types"><a class="type" href="../2 classes/Objects.Room.html#">Room</a></span>
A non-owning Room referencing the room.
</ol>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -156,7 +156,7 @@
<td class="summary">Check if the sound effect is playing.</td>
</tr>
<tr>
<td class="name" ><a href="#IsAudioTrackPlaying">IsAudioTrackPlaying(Track)</a></td>
<td class="name" ><a href="#IsAudioTrackPlaying">IsAudioTrackPlaying(track)</a></td>
<td class="summary">Check if the audio track is playing.</td>
</tr>
<tr>
@ -362,7 +362,7 @@
</dd>
<dt>
<a name = "IsAudioTrackPlaying"></a>
<strong>IsAudioTrackPlaying(Track)</strong>
<strong>IsAudioTrackPlaying(track)</strong>
</dt>
<dd>
Check if the audio track is playing.
@ -371,7 +371,7 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Track</span>
<li><span class="parameter">track</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
Filename to check. Should be without extension and without full directory path.
</li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -124,15 +124,15 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#ShowString">ShowString(str, time, autoDelete)</a></td>
<td class="name" ><a href="#ShowString">ShowString(string, [time], [autoDelete])</a></td>
<td class="summary">Show some text on-screen.</td>
</tr>
<tr>
<td class="name" ><a href="#HideString">HideString(str)</a></td>
<td class="name" ><a href="#HideString">HideString(string)</a></td>
<td class="summary">Hide some on-screen text.</td>
</tr>
<tr>
<td class="name" ><a href="#IsStringDisplaying">IsStringDisplaying(str)</a></td>
<td class="name" ><a href="#IsStringDisplaying">IsStringDisplaying(string)</a></td>
<td class="summary">Checks if the string is shown</td>
</tr>
</table>
@ -146,7 +146,7 @@
<dl class="function">
<dt>
<a name = "ShowString"></a>
<strong>ShowString(str, time, autoDelete)</strong>
<strong>ShowString(string, [time], [autoDelete])</strong>
</dt>
<dd>
Show some text on-screen.
@ -155,23 +155,21 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">str</span>
<li><span class="parameter">string</span>
<span class="types"><span class="type">DisplayString</span></span>
the string object to draw
The string object to draw.
</li>
<li><span class="parameter">time</span>
<span class="types"><span class="type">float</span></span>
the time in seconds for which to show the string.
If not given, the string will have an "infinite" life, and will show
The time in seconds for which to show the string. If not given, the string will have an "infinite" life, and will show
until <a href="../1 modules/Strings.html#HideString">HideString</a> is called or until the level is finished.
Default: nil (i.e. infinite)
<em>Optional.</em>
</li>
<li><span class="parameter">autoDelete</span>
<span class="types"><span class="type">bool</span></span>
should be string automatically deleted after timeout is reached.
If not given, the string will remain allocated even after timeout is reached, and can be
shown again without re-initialization.
Default: true
Should be string automatically deleted after timeout is reached. If not given, the string will remain
allocated even after timeout is reached, and can be shown again without re-initialization.
<em>Default: true.</em>
</li>
</ul>
@ -182,7 +180,7 @@ Default: true
</dd>
<dt>
<a name = "HideString"></a>
<strong>HideString(str)</strong>
<strong>HideString(string)</strong>
</dt>
<dd>
Hide some on-screen text.
@ -191,10 +189,9 @@ Default: true
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">str</span>
<li><span class="parameter">string</span>
<span class="types"><span class="type">DisplayString</span></span>
the string object to hide. Must previously have been shown
with a call to <a href="../1 modules/Strings.html#ShowString">ShowString</a>, or this function will have no effect.
The string object to hide. Must previously have been shown with a call to <a href="../1 modules/Strings.html#ShowString">ShowString</a>, or this function will have no effect.
</li>
</ul>
@ -205,7 +202,7 @@ with a call to <a href="../1 modules/Strings.html#ShowString">ShowString</a>, or
</dd>
<dt>
<a name = "IsStringDisplaying"></a>
<strong>IsStringDisplaying(str)</strong>
<strong>IsStringDisplaying(string)</strong>
</dt>
<dd>
Checks if the string is shown
@ -214,9 +211,9 @@ with a call to <a href="../1 modules/Strings.html#ShowString">ShowString</a>, or
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">str</span>
<li><span class="parameter">string</span>
<span class="types"><span class="type">DisplayString</span></span>
the string object to be checked
The string object to be checked.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -144,15 +144,15 @@
<td class="summary">Translate a pair of pixel coordinates to display position coordinates.</td>
</tr>
<tr>
<td class="name" ><a href="#PickMoveableByDisplayPosition">PickMoveableByDisplayPosition(Display)</a></td>
<td class="name" ><a href="#PickMoveableByDisplayPosition">PickMoveableByDisplayPosition(position)</a></td>
<td class="summary">Pick a moveable by the given display position.</td>
</tr>
<tr>
<td class="name" ><a href="#PickStaticByDisplayPosition">PickStaticByDisplayPosition(Display)</a></td>
<td class="name" ><a href="#PickStaticByDisplayPosition">PickStaticByDisplayPosition(position)</a></td>
<td class="summary">Pick a static mesh by the given display position.</td>
</tr>
<tr>
<td class="name" ><a href="#PrintLog">PrintLog(message, logLevel, [allowSpam])</a></td>
<td class="name" ><a href="#PrintLog">PrintLog(Message, logLevel, [allowSpam])</a></td>
<td class="summary">Write messages within the Log file</td>
</tr>
</table>
@ -169,8 +169,7 @@
<strong>HasLineOfSight(roomID, posA, posB)</strong>
</dt>
<dd>
Determine if there is a clear line of sight between two positions.
NOTE: Limited to room geometry. Objects are ignored.()
Determine if there is a clear line of sight between two positions. Limited to room geometry. Objects are ignored.
@ -194,7 +193,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
<strong>true</strong> if there is a line of sight, <strong>false</strong> if not.
true if there is a line of sight, false if not.
</ol>
@ -358,7 +357,7 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
</dd>
<dt>
<a name = "PickMoveableByDisplayPosition"></a>
<strong>PickMoveableByDisplayPosition(Display)</strong>
<strong>PickMoveableByDisplayPosition(position)</strong>
</dt>
<dd>
Pick a moveable by the given display position.
@ -367,9 +366,9 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Display</span>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
space position in percent.
Display space position in percent.
</li>
</ul>
@ -386,7 +385,7 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
</dd>
<dt>
<a name = "PickStaticByDisplayPosition"></a>
<strong>PickStaticByDisplayPosition(Display)</strong>
<strong>PickStaticByDisplayPosition(position)</strong>
</dt>
<dd>
Pick a static mesh by the given display position.
@ -395,9 +394,9 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Display</span>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
space position in percent.
Display space position in percent.
</li>
</ul>
@ -414,7 +413,7 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
</dd>
<dt>
<a name = "PrintLog"></a>
<strong>PrintLog(message, logLevel, [allowSpam])</strong>
<strong>PrintLog(Message, logLevel, [allowSpam])</strong>
</dt>
<dd>
Write messages within the Log file
@ -428,17 +427,17 @@ To be used with <a href="../2 classes/Strings.DisplayString.html#DisplayString:G
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">message</span>
<li><span class="parameter">Message</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
to be displayed within the Log
to be displayed within the log.
</li>
<li><span class="parameter">logLevel</span>
<span class="types"><a class="type" href="../4 enums/Util.LogLevel.html#">LogLevel</a></span>
log level to be displayed
Log level to be displayed.
</li>
<li><span class="parameter">allowSpam</span>
<span class="types"><span class="type">bool</span></span>
true allows spamming of the message
If true, allows continuous spamming of the message.
<em>Optional.</em>
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -124,15 +124,15 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#FadeIn">FadeIn(speed)</a></td>
<td class="name" ><a href="#FadeIn">FadeIn([speed])</a></td>
<td class="summary">Do a full-screen fade-in from black.</td>
</tr>
<tr>
<td class="name" ><a href="#FadeOut">FadeOut(speed)</a></td>
<td class="name" ><a href="#FadeOut">FadeOut([speed])</a></td>
<td class="summary">Do a full-screen fade-to-black.</td>
</tr>
<tr>
<td class="name" ><a href="#SetCineBars">SetCineBars(height, speed)</a></td>
<td class="name" ><a href="#SetCineBars">SetCineBars([height], [speed])</a></td>
<td class="summary">Move black cinematic bars in from the top and bottom of the game window.</td>
</tr>
<tr>
@ -164,7 +164,7 @@
<td class="summary">Sets the post-process effect mode, like negative or monochrome.</td>
</tr>
<tr>
<td class="name" ><a href="#SetPostProcessStrength">SetPostProcessStrength(strength)</a></td>
<td class="name" ><a href="#SetPostProcessStrength">SetPostProcessStrength([strength])</a></td>
<td class="summary">Sets the post-process effect strength.</td>
</tr>
<tr>
@ -172,7 +172,7 @@
<td class="summary">Sets the post-process tint.</td>
</tr>
<tr>
<td class="name" ><a href="#PlayVideo">PlayVideo(fileName[, background][, silent][, loop])</a></td>
<td class="name" ><a href="#PlayVideo">PlayVideo(fileName, [background], [silent], [loop])</a></td>
<td class="summary">Play a video file.</td>
</tr>
<tr>
@ -212,7 +212,7 @@
<td class="summary">Reset object camera back to Lara and deactivate object camera.</td>
</tr>
<tr>
<td class="name" ><a href="#FlashScreen">FlashScreen(color, speed)</a></td>
<td class="name" ><a href="#FlashScreen">FlashScreen([color], [speed])</a></td>
<td class="summary">Flash screen.</td>
</tr>
<tr>
@ -230,7 +230,7 @@
<dl class="function">
<dt>
<a name = "FadeIn"></a>
<strong>FadeIn(speed)</strong>
<strong>FadeIn([speed])</strong>
</dt>
<dd>
Do a full-screen fade-in from black.
@ -241,7 +241,8 @@
<ul>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">float</span></span>
(default 1.0). Speed in units per second. A value of 1 will make the fade take one second.
Speed in units per second. A value of 1 will make the fade take one second.
<em>Default: 1.</em>
</li>
</ul>
@ -252,7 +253,7 @@
</dd>
<dt>
<a name = "FadeOut"></a>
<strong>FadeOut(speed)</strong>
<strong>FadeOut([speed])</strong>
</dt>
<dd>
Do a full-screen fade-to-black. The screen will remain black until a call to FadeIn.
@ -263,7 +264,8 @@
<ul>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">float</span></span>
(default 1.0). Speed in units per second. A value of 1 will make the fade take one second.
Speed in units per second. A value of 1 will make the fade take one second.
<em>Default: 1.</em>
</li>
</ul>
@ -274,7 +276,7 @@
</dd>
<dt>
<a name = "SetCineBars"></a>
<strong>SetCineBars(height, speed)</strong>
<strong>SetCineBars([height], [speed])</strong>
</dt>
<dd>
Move black cinematic bars in from the top and bottom of the game window.
@ -285,11 +287,13 @@
<ul>
<li><span class="parameter">height</span>
<span class="types"><span class="type">float</span></span>
(default 30). Percentage of the screen to be covered
Percentage of the screen to be covered.
<em>Default: 30.</em>
</li>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">float</span></span>
(default 30). Coverage percent per second
Coverage percent per second.
<em>Default: 30.</em>
</li>
</ul>
@ -311,7 +315,7 @@
<ul>
<li><span class="parameter">angle</span>
<span class="types"><span class="type">float</span></span>
in degrees (clamped to [10, 170])
Angle in degrees (clamped to [10, 170]).
</li>
</ul>
@ -334,7 +338,7 @@
<ol>
<span class="types"><span class="type">float</span></span>
current FOV angle in degrees
Current FOV angle in degrees.
</ol>
@ -355,7 +359,7 @@
<ol>
<span class="types"><a class="type" href="../4 enums/View.CameraType.html#">CameraType</a></span>
value used by the Main Camera.
Value used by the game camera.
</ol>
@ -384,7 +388,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
current camera position
Current camera position.
</ol>
@ -405,7 +409,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
current camera target
Current camera target.
</ol>
@ -426,7 +430,7 @@
<ol>
<span class="types"><a class="type" href="../2 classes/Objects.Room.html#">Room</a></span>
current room of the camera
Current room of the camera.
</ol>
@ -446,7 +450,7 @@
<ul>
<li><span class="parameter">effect</span>
<span class="types"><a class="type" href="../4 enums/View.PostProcessMode.html#">PostProcessMode</a></span>
type to set.
Effect type to set.
</li>
</ul>
@ -457,7 +461,7 @@
</dd>
<dt>
<a name = "SetPostProcessStrength"></a>
<strong>SetPostProcessStrength(strength)</strong>
<strong>SetPostProcessStrength([strength])</strong>
</dt>
<dd>
Sets the post-process effect strength.
@ -468,7 +472,8 @@
<ul>
<li><span class="parameter">strength</span>
<span class="types"><span class="type">float</span></span>
(default 1.0). How strong the effect is.
How strong the effect is.
<em>Default: 1.</em>
</li>
</ul>
@ -501,7 +506,7 @@
</dd>
<dt>
<a name = "PlayVideo"></a>
<strong>PlayVideo(fileName[, background][, silent][, loop])</strong>
<strong>PlayVideo(fileName, [background], [silent], [loop])</strong>
</dt>
<dd>
Play a video file. File should be placed in the <code>FMV</code> folder.
@ -512,23 +517,23 @@
<ul>
<li><span class="parameter">fileName</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
Video file name. Can be provided without extension, if type is mp4, mkv or avi.
Video file name. Can be provided without extension, if type is mp4, mkv, mov or avi.
</li>
<li><span class="parameter">background</span>
<span class="types"><span class="type">bool</span></span>
(default: false). Play video in the background mode.
Play video in the background mode.
In such case, video won't play in fullscreen, but must be shown using special animated texture type in Tomb Editor, or using <a href="../2 classes/View.DisplaySprite.html#">View.DisplaySprite</a>.
(<em>optional</em>)
<em>Default: false.</em>
</li>
<li><span class="parameter">silent</span>
<span class="types"><span class="type">bool</span></span>
(default: false). Play video without sound.
(<em>optional</em>)
Play video without sound.
<em>Default: false.</em>
</li>
<li><span class="parameter">loop</span>
<span class="types"><span class="type">bool</span></span>
(default: false). Play video in a loop.
(<em>optional</em>)
Play video in a loop.
<em>Default: false.</em>
</li>
</ul>
@ -630,7 +635,7 @@
<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>
Video file name. If provided, checks if the currently playing video file name is the same as the provided one.
(<em>optional</em>)
<em>Optional.</em>
</li>
</ul>
@ -758,7 +763,7 @@
</dd>
<dt>
<a name = "FlashScreen"></a>
<strong>FlashScreen(color, speed)</strong>
<strong>FlashScreen([color], [speed])</strong>
</dt>
<dd>
Flash screen.
@ -769,11 +774,13 @@
<ul>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
(default Color(255, 255, 255))
Color.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">float</span></span>
(default 1.0). Speed in units per second. Value of 1 will make flash take one second. Clamped to [0.005, 1.0].
Speed in units per second. Value of 1 will make flash take one second. Clamped to [0.005, 1.0].
<em>Default: 1.</em>
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -123,7 +123,7 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#nameKey">nameKey</a></td>
<td class="summary">(string) string key for the level's (localised) name.</td>
<td class="summary">(string) String key for the level's name.</td>
</tr>
<tr>
<td class="name" ><a href="#scriptFile">scriptFile</a></td>
@ -139,7 +139,7 @@
</tr>
<tr>
<td class="name" ><a href="#ambientTrack">ambientTrack</a></td>
<td class="summary">(string) initial ambient sound track to play.</td>
<td class="summary">(string) Initial ambient sound track to play.</td>
</tr>
<tr>
<td class="name" ><a href="#layer1">layer1</a></td>
@ -151,11 +151,11 @@
</tr>
<tr>
<td class="name" ><a href="#horizon1">horizon1</a></td>
<td class="summary">(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) First horizon layer.</td>
<td class="summary">(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Primary horizon object.</td>
</tr>
<tr>
<td class="name" ><a href="#horizon2">horizon2</a></td>
<td class="summary">(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Second horizon layer.</td>
<td class="summary">(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Secondary horizon object.</td>
</tr>
<tr>
<td class="name" ><a href="#starfield">starfield</a></td>
@ -183,7 +183,7 @@
</tr>
<tr>
<td class="name" ><a href="#laraType">laraType</a></td>
<td class="summary">(LaraType) Must be one of the LaraType values.</td>
<td class="summary">(LaraType) Appearance of Lara.</td>
</tr>
<tr>
<td class="name" ><a href="#rumble">rumble</a></td>
@ -226,8 +226,7 @@
<strong>nameKey</strong>
</dt>
<dd>
(string) string key for the level's (localised) name.
Corresponds to an entry in strings.lua.
(string) String key for the level's name. Corresponds to an entry in strings.lua.
@ -243,7 +242,7 @@
</dt>
<dd>
(string) Level-specific Lua script file.
Path of the Lua file holding the level's logic script, relative to the location of the tombengine executable
Path of the Lua file holding the level's logic script, relative to the location of the Tomb Engine executable.
@ -275,7 +274,7 @@
</dt>
<dd>
(string) Load screen image.
Path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable
Path of the level's load screen file (.png or .jpg), relative to the location of the Tomb Engine executable.
@ -290,7 +289,7 @@
<strong>ambientTrack</strong>
</dt>
<dd>
(string) initial ambient sound track to play.
(string) Initial ambient sound track to play.
This is the filename of the track <strong>without</strong> the .wav extension.
@ -336,7 +335,7 @@
<strong>horizon1</strong>
</dt>
<dd>
(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) First horizon layer.
(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Primary horizon object.
@ -351,7 +350,7 @@
<strong>horizon2</strong>
</dt>
<dd>
(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Second horizon layer.
(<a href="../3 primitive classes/Flow.Horizon.html#">Flow.Horizon</a>) Secondary horizon object.
@ -413,7 +412,7 @@
</dt>
<dd>
(bool) Enable flickering lightning in the sky.
Equivalent to classic TRLE's LIGHTNING setting. As in the TRC Ireland levels.
Equivalent to classic TRLE's lightning setting, as in the TRC Ireland levels or TR4 Cairo levels.
@ -460,20 +459,9 @@
<strong>laraType</strong>
</dt>
<dd>
(LaraType) Must be one of the LaraType values.
These are:</p>
<pre><code>Normal
Young
Bunhead
Catsuit
Divesuit
Invisible
</code></pre>
<p>e.g. <code>myLevel.laraType = LaraType.Divesuit</code></p>
<p> <strong>Not yet fully implemented.</strong> Only types <code>Normal</code> and <code>Young</code> are guaranteed to work.
(LaraType) Appearance of Lara. Must be either <code>LaraType.Normal</code> or <code>LaraType.Young</code>.
E.g. <code>myLevel.laraType = LaraType.Young</code> will make Lara appear as young (with two ponytails rendered).
This setting does not affect ability to use weapons or flares.

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -350,7 +350,7 @@
<ul>
<li><span class="parameter">crawlExtended</span>
<span class="types"><span class="type">bool</span></span>
when enabled, player will be able to traverse across one-click steps in crawlspaces.
When enabled, player will be able to traverse across one-click steps in crawlspaces.
</li>
</ul>
@ -371,7 +371,7 @@
<ul>
<li><span class="parameter">crouchRoll</span>
<span class="types"><span class="type">bool</span></span>
when enabled, player can perform crawlspace roll by pressing sprint key.
When enabled, player can perform crawlspace roll by pressing sprint key.
</li>
</ul>
@ -392,7 +392,7 @@
<ul>
<li><span class="parameter">crawlspaceSwandive</span>
<span class="types"><span class="type">bool</span></span>
when enabled, player will be able to swandive into crawlspaces.
When enabled, player will be able to swandive into crawlspaces.
</li>
</ul>
@ -413,7 +413,7 @@
<ul>
<li><span class="parameter">sprintJump</span>
<span class="types"><span class="type">bool</span></span>
if enabled, player will be able to perform extremely long jump when sprinting.
If enabled, player will be able to perform extremely long jump when sprinting.
</li>
</ul>
@ -434,7 +434,7 @@
<ul>
<li><span class="parameter">ledgeJumps</span>
<span class="types"><span class="type">bool</span></span>
if this setting is enabled, player will be able to jump upwards while hanging on the ledge.
If this setting is enabled, player will be able to jump upwards while hanging on the ledge.
</li>
</ul>
@ -455,7 +455,7 @@
<ul>
<li><span class="parameter">poseTimeout</span>
<span class="types"><span class="type">int</span></span>
if this setting is larger than 0, idle standing pose animation will be performed after given timeout (in seconds).
If this setting is larger than 0, idle standing pose animation will be performed after given timeout (in seconds).
</li>
</ul>
@ -483,7 +483,7 @@
<ul>
<li><span class="parameter">binocularLightColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
color of highlight, when player presses action. Zero color means there will be no highlight.
Color of highlight, when player presses action. Zero color means there will be no highlight.
</li>
</ul>
@ -504,7 +504,7 @@
<ul>
<li><span class="parameter">lasersightLightColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
lasersight highlight color. Zero color means there will be no highlight.
Lasersight highlight color. Zero color means there will be no highlight.
</li>
</ul>
@ -525,7 +525,7 @@
<ul>
<li><span class="parameter">objectCollision</span>
<span class="types"><span class="type">bool</span></span>
when enabled, camera will collide with moveables and statics. Disable for TR4-like camera behaviour.
When enabled, camera will collide with moveables and statics. Disable for TR4-like camera behaviour.
</li>
</ul>
@ -553,7 +553,7 @@
<ul>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
flare color. Used for sparks and lensflare coloring as well.
Flare color. Used for sparks and lensflare coloring as well.
</li>
</ul>
@ -574,7 +574,7 @@
<ul>
<li><span class="parameter">offset</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
a relative muzzle offset where light and particle effects originate from.
A relative muzzle offset where light and particle effects originate from.
</li>
</ul>
@ -595,7 +595,7 @@
<ul>
<li><span class="parameter">range</span>
<span class="types"><span class="type">int</span></span>
flare light radius or range. Represented in "clicks" equal to 256 world units.
Flare light radius or range. Represented in "clicks" equal to 256 world units.
</li>
</ul>
@ -616,7 +616,7 @@
<ul>
<li><span class="parameter">timeout</span>
<span class="types"><span class="type">int</span></span>
flare burn timeout. Flare will stop working after given timeout (specified in seconds).
Flare burn timeout. Flare will stop working after given timeout (specified in seconds).
</li>
</ul>
@ -637,7 +637,7 @@
<ul>
<li><span class="parameter">pickupCount</span>
<span class="types"><span class="type">int</span></span>
specifies amount of flares that you get when you pick up a box of flares.
Specifies amount of flares that you get when you pick up a box of flares.
</li>
</ul>
@ -658,7 +658,7 @@
<ul>
<li><span class="parameter">lensflareBrightness</span>
<span class="types"><span class="type">float</span></span>
brightness multiplier. Specifies how bright lens flare is in relation to light (on a range from 0 to 1).
Brightness multiplier. Specifies how bright lens flare is in relation to light (on a range from 0 to 1).
</li>
</ul>
@ -679,7 +679,7 @@
<ul>
<li><span class="parameter">sparks</span>
<span class="types"><span class="type">bool</span></span>
spark effect. Determines whether flare generates sparks when burning.
Spark effect. Determines whether flare generates sparks when burning.
</li>
</ul>
@ -700,7 +700,7 @@
<ul>
<li><span class="parameter">smoke</span>
<span class="types"><span class="type">bool</span></span>
smoke effect. Determines whether flare generates smoke when burning.
Smoke effect. Determines whether flare generates smoke when burning.
</li>
</ul>
@ -721,7 +721,7 @@
<ul>
<li><span class="parameter">flicker</span>
<span class="types"><span class="type">bool</span></span>
light and lensflare flickering. When turned off, flare light will be constant.
Light and lensflare flickering. When turned off, flare light will be constant.
</li>
</ul>
@ -751,7 +751,7 @@
<ul>
<li><span class="parameter">mesh</span>
<span class="types"><span class="type">int</span></span>
index of a root mesh to which hair will attach. Root mesh may be different for each hair object.
Index of a root mesh to which hair will attach. Root mesh may be different for each hair object.
</li>
</ul>
@ -772,7 +772,7 @@
<ul>
<li><span class="parameter">offset</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
specifies how braid is positioned in relation to a headmesh.
Specifies how braid is positioned in relation to a headmesh.
</li>
</ul>
@ -793,7 +793,7 @@
<ul>
<li><span class="parameter">indices</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
a list of headmesh's vertex connection indices. Each index corresponds to nearest braid rootmesh vertex. Amount of indices is unlimited.
A list of headmesh's vertex connection indices. Each index corresponds to nearest braid rootmesh vertex. Amount of indices is unlimited.
</li>
</ul>
@ -821,7 +821,7 @@
<ul>
<li><span class="parameter">statusBars</span>
<span class="types"><span class="type">bool</span></span>
if disabled, all status bars (health, air, stamina) will be hidden.
If disabled, all status bars (health, air, stamina) will be hidden.
</li>
</ul>
@ -842,7 +842,7 @@
<ul>
<li><span class="parameter">loadingBar</span>
<span class="types"><span class="type">bool</span></span>
if disabled, loading bar will be invisible in game.
If disabled, loading bar will be invisible in game.
</li>
</ul>
@ -863,7 +863,7 @@
<ul>
<li><span class="parameter">speedometer</span>
<span class="types"><span class="type">bool</span></span>
if disabled, speedometer will be invisible in game.
If disabled, speedometer will be invisible in game.
</li>
</ul>
@ -884,7 +884,7 @@
<ul>
<li><span class="parameter">pickupNotifier</span>
<span class="types"><span class="type">bool</span></span>
if disabled, pickup notifier will be invisible in game.
If disabled, pickup notifier will be invisible in game.
</li>
</ul>
@ -912,7 +912,7 @@
<ul>
<li><span class="parameter">gravity</span>
<span class="types"><span class="type">float</span></span>
specifies global gravity. Mostly affects Lara and several other objects.
Specifies global gravity. Mostly affects Lara and several other objects.
</li>
</ul>
@ -933,7 +933,7 @@
<ul>
<li><span class="parameter">swimVelocity</span>
<span class="types"><span class="type">float</span></span>
specifies swim velocity for Lara. Affects both surface and underwater.
Specifies swim velocity for Lara. Affects both surface and underwater.
</li>
</ul>
@ -962,7 +962,7 @@
<ul>
<li><span class="parameter">accuracy</span>
<span class="types"><span class="type">float</span></span>
determines accuracy range in angles (smaller angles mean higher accuracy). Applicable only for firearms.
Determines accuracy range in angles (smaller angles mean higher accuracy). Applicable only for firearms.
</li>
</ul>
@ -983,7 +983,7 @@
<ul>
<li><span class="parameter">targetingDistance</span>
<span class="types"><span class="type">float</span></span>
specifies maximum targeting distance in world units (1 block = 1024 world units) for a given weapon.
Specifies maximum targeting distance in world units (1 block = 1024 world units) for a given weapon.
</li>
</ul>
@ -1004,7 +1004,7 @@
<ul>
<li><span class="parameter">interval</span>
<span class="types"><span class="type">float</span></span>
specifies an interval (in frames), after which Lara is able to shoot again. Not applicable for backholster weapons.
Specifies an interval (in frames), after which Lara is able to shoot again. Not applicable for backholster weapons.
</li>
</ul>
@ -1025,7 +1025,7 @@
<ul>
<li><span class="parameter">damage</span>
<span class="types"><span class="type">int</span></span>
amount of hit points taken for every hit.
Amount of hit points taken for every hit.
</li>
</ul>
@ -1046,7 +1046,7 @@
<ul>
<li><span class="parameter">alternateDamage</span>
<span class="types"><span class="type">int</span></span>
for Revolver and HK, specifies damage in lasersight mode. For crossbow, specifies damage for explosive ammo.
For Revolver and HK, specifies damage in lasersight mode. For crossbow, specifies damage for explosive ammo.
</li>
</ul>
@ -1067,7 +1067,7 @@
<ul>
<li><span class="parameter">waterLevel</span>
<span class="types"><span class="type">int</span></span>
specifies water depth, at which Lara will put weapons back into holsters, indicating it's not possible to use it in water.
Specifies water depth, at which Lara will put weapons back into holsters, indicating it's not possible to use it in water.
</li>
</ul>
@ -1088,7 +1088,7 @@
<ul>
<li><span class="parameter">pickupCount</span>
<span class="types"><span class="type">int</span></span>
amount of ammo which is given with every ammo pickup for this weapon.
Amount of ammo which is given with every ammo pickup for this weapon.
</li>
</ul>
@ -1193,7 +1193,7 @@
<ul>
<li><span class="parameter">shell</span>
<span class="types"><span class="type">bool</span></span>
if set to true, indicates that weapon emits gun shell. Applicable only for firearms.
If set to true, indicates that weapon emits gun shell. Applicable only for firearms.
</li>
</ul>
@ -1305,7 +1305,7 @@
<ul>
<li><span class="parameter">errorMode</span>
<span class="types"><a class="type" href="../4 enums/Flow.ErrorMode.html#">ErrorMode</a></span>
error mode to use.
Error mode to use.
</li>
</ul>
@ -1328,7 +1328,7 @@
<ul>
<li><span class="parameter">multithreaded</span>
<span class="types"><span class="type">bool</span></span>
determines whether to use multithreading or not.
Determines whether to use multithreading or not.
</li>
</ul>
@ -1352,7 +1352,7 @@
<ul>
<li><span class="parameter">fastReload</span>
<span class="types"><span class="type">bool</span></span>
toggle fast reload on or off.
Toggles fast reload on or off.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -178,7 +178,7 @@
<ul>
<li><span class="parameter">ammoHits</span>
<span class="types"><span class="type">int</span></span>
amount of successful enemy hits.
Amount of successful enemy hits.
</li>
</ul>
@ -199,7 +199,7 @@
<ul>
<li><span class="parameter">ammoUsed</span>
<span class="types"><span class="type">int</span></span>
amount of used ammo.
Amount of used ammo.
</li>
</ul>
@ -220,7 +220,7 @@
<ul>
<li><span class="parameter">distanceTraveled</span>
<span class="types"><span class="type">int</span></span>
amount of traveled distance in world units. One meter is 420 world units.
Amount of traveled distance in world units. One meter is 420 world units.
</li>
</ul>
@ -241,7 +241,7 @@
<ul>
<li><span class="parameter">healthPacksUsed</span>
<span class="types"><span class="type">int</span></span>
amount of used medipacks.
Amount of used medipacks.
</li>
</ul>
@ -262,7 +262,7 @@
<ul>
<li><span class="parameter">damageTaken</span>
<span class="types"><span class="type">int</span></span>
overall amount of taken damage.
overall Amount of taken damage.
</li>
</ul>
@ -283,7 +283,7 @@
<ul>
<li><span class="parameter">kills</span>
<span class="types"><span class="type">int</span></span>
amount of killed enemies.
Amount of killed enemies.
</li>
</ul>
@ -304,7 +304,7 @@
<ul>
<li><span class="parameter">pickups</span>
<span class="types"><span class="type">int</span></span>
amount of picked up items.
Amount of picked up items.
</li>
</ul>
@ -325,7 +325,7 @@
<ul>
<li><span class="parameter">secrets</span>
<span class="types"><span class="type">int</span></span>
amount of found secrets.
Amount of found secrets.
</li>
</ul>
@ -346,7 +346,7 @@
<ul>
<li><span class="parameter">timeTaken</span>
<span class="types"><a class="type" href="../3 primitive classes/Time.html#">Time</a></span>
amount of time passed.
Amount of time passed.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -125,11 +125,11 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#AIObject:GetPosition">AIObject:GetPosition()</a></td>
<td class="summary">Get the object's position</td>
<td class="summary">Get the object's position.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:SetPosition">AIObject:SetPosition(position)</a></td>
<td class="summary">Set the object's position</td>
<td class="summary">Set the object's position.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetRotationY">AIObject:GetRotationY()</a></td>
@ -141,32 +141,31 @@
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetName">AIObject:GetName()</a></td>
<td class="summary">Get the object's unique string identifier</td>
<td class="summary">Get the object's unique string identifier.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:SetName">AIObject:SetName(name)</a></td>
<td class="summary">Set the object's name (its unique string identifier)</td>
<td class="summary">Set the object's unique string identifier.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetRoom">AIObject:GetRoom()</a></td>
<td class="summary">Get the current room of the object</td>
<td class="summary">Get the current room of the object.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetRoomNumber">AIObject:GetRoomNumber()</a></td>
<td class="summary">Get the current room number of the object</td>
<td class="summary">Get the current room number of the object.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:SetRoomNumber">AIObject:SetRoomNumber(ID)</a></td>
<td class="summary">Set room number of the object
This is used in conjunction with SetPosition to teleport the object to a new room.</td>
<td class="summary">Set room number of the object.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:GetObjectID">AIObject:GetObjectID()</a></td>
<td class="summary">Retrieve the object ID</td>
<td class="summary">Retrieve the object ID.</td>
</tr>
<tr>
<td class="name" ><a href="#AIObject:SetObjectID">AIObject:SetObjectID(ID)</a></td>
<td class="summary">Change the object's ID.</td>
<td class="summary">Change the object ID.</td>
</tr>
</table>
@ -182,7 +181,7 @@
<strong>AIObject:GetPosition()</strong>
</dt>
<dd>
Get the object's position
Get the object's position.
@ -191,7 +190,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
a copy of the object's position
A copy of the object's position.
</ol>
@ -203,7 +202,7 @@
<strong>AIObject:SetPosition(position)</strong>
</dt>
<dd>
Set the object's position
Set the object's position.
@ -211,7 +210,7 @@
<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 object
The new position of the object.
</li>
</ul>
@ -226,7 +225,6 @@
</dt>
<dd>
Get the object's Y-axis rotation.
To the best of my knowledge, the rotation of an AIObject has no effect.
@ -234,8 +232,8 @@
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">number</span></span>
the object's Y-axis rotation
<span class="types"><span class="type">int</span></span>
The object's Y-axis rotation.
</ol>
@ -248,15 +246,14 @@
</dt>
<dd>
Set the object's Y-axis rotation.
To the best of my knowledge, the rotation of an AIObject has no effect.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">rotation</span>
<span class="types"><span class="type">number</span></span>
The object's new Y-axis rotation
<span class="types"><span class="type">int</span></span>
The object's new Y-axis rotation.
</li>
</ul>
@ -270,7 +267,7 @@
<strong>AIObject:GetName()</strong>
</dt>
<dd>
Get the object's unique string identifier
Get the object's unique string identifier.
@ -279,7 +276,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the object's name
The object's name.
</ol>
@ -291,7 +288,7 @@
<strong>AIObject:SetName(name)</strong>
</dt>
<dd>
Set the object's name (its unique string identifier)
Set the object's unique string identifier.
@ -299,7 +296,7 @@
<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 object's new name
The object's new name.
</li>
</ul>
@ -313,7 +310,7 @@
<strong>AIObject:GetRoom()</strong>
</dt>
<dd>
Get the current room of the object
Get the current room of the object.
@ -321,8 +318,8 @@
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Room</span></span>
current room of the object
<span class="types"><a class="type" href="../2 classes/Objects.Room.html#">Room</a></span>
current room of the object.
</ol>
@ -334,7 +331,7 @@
<strong>AIObject:GetRoomNumber()</strong>
</dt>
<dd>
Get the current room number of the object
Get the current room number of the object.
@ -343,7 +340,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
number representing the current room of the object
Number representing the current room of the object.
</ol>
@ -355,7 +352,7 @@
<strong>AIObject:SetRoomNumber(ID)</strong>
</dt>
<dd>
Set room number of the object
Set room number of the object.
This is used in conjunction with SetPosition to teleport the object to a new room.
@ -364,7 +361,7 @@
<ul>
<li><span class="parameter">ID</span>
<span class="types"><span class="type">int</span></span>
the ID of the new room
The ID of the new room.
</li>
</ul>
@ -378,7 +375,7 @@
<strong>AIObject:GetObjectID()</strong>
</dt>
<dd>
Retrieve the object ID
Retrieve the object ID.
@ -387,7 +384,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
a number representing the ID of the object
A number representing the ID of the object.
</ol>
@ -399,7 +396,7 @@
<strong>AIObject:SetObjectID(ID)</strong>
</dt>
<dd>
Change the object's ID. This will change the type of AI object it is.
Change the object ID. This will change the type of AI object it is.
Note that a baddy will gain the behaviour of the tile it's on <em>before</em> said baddy is triggered.
This means that changing the type of an AI object beneath a moveable will have no effect.
Instead, this function can be used to change an object that the baddy isn't standing on.
@ -412,7 +409,7 @@
<ul>
<li><span class="parameter">ID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
the new ID
the new ID.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -125,11 +125,11 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#Camera:GetPosition">Camera:GetPosition()</a></td>
<td class="summary">Get the camera's position</td>
<td class="summary">Get the camera's position.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:SetPosition">Camera:SetPosition(position)</a></td>
<td class="summary">Set the camera's position</td>
<td class="summary">Set the camera's position.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:GetName">Camera:GetName()</a></td>
@ -137,24 +137,23 @@
</tr>
<tr>
<td class="name" ><a href="#Camera:SetName">Camera:SetName(name)</a></td>
<td class="summary">Set the camera's name (its unique string identifier)</td>
<td class="summary">Set the camera's name (its unique string identifier).</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:GetRoom">Camera:GetRoom()</a></td>
<td class="summary">Get the current room of the camera</td>
<td class="summary">Get the current room of the camera.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:GetRoomNumber">Camera:GetRoomNumber()</a></td>
<td class="summary">Get the current room number of the camera</td>
<td class="summary">Get the current room number of the camera.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:SetRoomNumber">Camera:SetRoomNumber(ID)</a></td>
<td class="summary">Set room of camera
This is used in conjunction with SetPosition to teleport the camera to a new room.</td>
<td class="summary">Set room of camera.</td>
</tr>
<tr>
<td class="name" ><a href="#Camera:PlayCamera">Camera:PlayCamera([Target])</a></td>
<td class="summary">Active the camera during that frame.</td>
<td class="name" ><a href="#Camera:PlayCamera">Camera:PlayCamera([target])</a></td>
<td class="summary">Activate the camera for the current game frame.</td>
</tr>
</table>
@ -170,7 +169,7 @@
<strong>Camera:GetPosition()</strong>
</dt>
<dd>
Get the camera's position
Get the camera's position.
@ -179,7 +178,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
a copy of the camera's position
Camera's position.
</ol>
@ -191,7 +190,7 @@
<strong>Camera:SetPosition(position)</strong>
</dt>
<dd>
Set the camera's position
Set the camera's position.
@ -199,7 +198,7 @@
<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 camera
The new position of the camera.
</li>
</ul>
@ -222,7 +221,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the camera's name
the camera's name.
</ol>
@ -234,7 +233,7 @@
<strong>Camera:SetName(name)</strong>
</dt>
<dd>
Set the camera's name (its unique string identifier)
Set the camera's name (its unique string identifier).
@ -242,7 +241,7 @@
<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 camera's new name
The camera's new name.
</li>
</ul>
@ -256,7 +255,7 @@
<strong>Camera:GetRoom()</strong>
</dt>
<dd>
Get the current room of the camera
Get the current room of the camera.
@ -264,8 +263,8 @@
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">Room</span></span>
current room of the camera
<span class="types"><a class="type" href="../2 classes/Objects.Room.html#">Room</a></span>
Current room of the camera.
</ol>
@ -277,7 +276,7 @@
<strong>Camera:GetRoomNumber()</strong>
</dt>
<dd>
Get the current room number of the camera
Get the current room number of the camera.
@ -286,7 +285,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
number representing the current room of the camera
Number representing the current room of the camera.
</ol>
@ -298,7 +297,7 @@
<strong>Camera:SetRoomNumber(ID)</strong>
</dt>
<dd>
Set room of camera
Set room of camera.
This is used in conjunction with SetPosition to teleport the camera to a new room.
@ -307,7 +306,7 @@
<ul>
<li><span class="parameter">ID</span>
<span class="types"><span class="type">int</span></span>
the ID of the new room
The ID of the new room.
</li>
</ul>
@ -318,17 +317,17 @@
</dd>
<dt>
<a name = "Camera:PlayCamera"></a>
<strong>Camera:PlayCamera([Target])</strong>
<strong>Camera:PlayCamera([target])</strong>
</dt>
<dd>
Active the camera during that frame.
Activate the camera for the current game frame.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Target</span>
<span class="types"><span class="type">Moveable</span></span>
<li><span class="parameter">target</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
If you put a moveable, the camera will look at it. Otherwise, it will look at Lara.
<em>Optional.</em>
</li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -115,7 +115,7 @@
<div id="content">
<h1>Class <code>Objects.LaraObject</code></h1>
<p>Class for extra player-only functions.</p>
<p>Class for player-only functions.</p>
<p> Do not try to create an object of this type. Use the built-in <em>Lara</em> variable instead.
LaraObject inherits all the functions of <a href="../2 classes/Objects.Moveable.html#">Moveable</a>.</p>
@ -124,63 +124,63 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#LaraObject:SetPoison">LaraObject:SetPoison([poison])</a></td>
<td class="summary">Set player poison.</td>
<td class="summary">Set the player's poison value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetPoison">LaraObject:GetPoison()</a></td>
<td class="summary">Get poison potency of Lara.</td>
<td class="summary">Get the player's poison value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:SetAir">LaraObject:SetAir(air)</a></td>
<td class="summary">Set air value of Lara.</td>
<td class="summary">Set the player's air value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetAir">LaraObject:GetAir()</a></td>
<td class="summary">Get air value of Lara.</td>
<td class="summary">Get the player's air value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:SetWet">LaraObject:SetWet(wetness)</a></td>
<td class="summary">Set wetness value of Lara (causes dripping).</td>
<td class="summary">Set the player's wetness value, causing drips.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetWet">LaraObject:GetWet()</a></td>
<td class="summary">Get wetness value of Lara.</td>
<td class="summary">Get the player's wetness value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:SetStamina">LaraObject:SetStamina(stamina)</a></td>
<td class="summary">Set sprint energy value of Lara.</td>
<td class="name" ><a href="#LaraObject:SetStamina">LaraObject:SetStamina(New)</a></td>
<td class="summary">Set the player's stamina value.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetStamina">LaraObject:GetStamina()</a></td>
<td class="summary">Get stamina value of Lara.</td>
<td class="summary">Get the player's stamina value.</td>
</tr>
<tr>
<td class="name" ><a href="#Moveable:GetAirborne">Moveable:GetAirborne()</a></td>
<td class="summary">Get the moveable's airborne status.</td>
<td class="summary">Get the player's airborne status (set when jumping and falling).</td>
</tr>
<tr>
<td class="name" ><a href="#Moveable:SetAirborne">Moveable:SetAirborne(airborne)</a></td>
<td class="summary">Set the moveable's airborne status.</td>
<td class="summary">Set the player's airborne status.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:UndrawWeapon">LaraObject:UndrawWeapon()</a></td>
<td class="summary">Lara will undraw her weapon if it is drawn and throw away a flare if she is currently holding one.</td>
<td class="summary">Undraw a weapon if it is drawn and throw away a flare if currently holding one.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:ThrowAwayTorch">LaraObject:ThrowAwayTorch()</a></td>
<td class="summary">Lara will throw away the torch if she currently holds one in her hand.</td>
<td class="name" ><a href="#LaraObject:DiscardTorch">LaraObject:DiscardTorch()</a></td>
<td class="summary">Discard a held torch.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetHandStatus">LaraObject:GetHandStatus()</a></td>
<td class="summary">Get actual hand status of Lara.</td>
<td class="summary">Get the player's hand status.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetWeaponType">LaraObject:GetWeaponType()</a></td>
<td class="summary">Get actual weapon type of Lara.</td>
<td class="summary">Get the player's weapon type.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:SetWeaponType">LaraObject:SetWeaponType(weaponType, activate)</a></td>
<td class="summary">Set Lara weapon type.</td>
<td class="summary">Set the player's weapon type.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:GetAmmoType">LaraObject:GetAmmoType()</a></td>
@ -203,8 +203,16 @@
<td class="summary">Get the player's current interacted moveable (if it exists).</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:TorchIsLit">LaraObject:TorchIsLit()</a></td>
<td class="summary">Get current light state of the torch, if it exists</td>
<td class="name" ><a href="#LaraObject:IsTorchLit">LaraObject:IsTorchLit()</a></td>
<td class="summary">Check if a held torch is lit.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:Interact">LaraObject:Interact(mov, [animNumber], [offset], [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint], [actionID])</a></td>
<td class="summary">Align the player with a moveable object for interaction.</td>
</tr>
<tr>
<td class="name" ><a href="#LaraObject:TestInteraction">LaraObject:TestInteraction(mov, [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint])</a></td>
<td class="summary">Test the player against a moveable object for interaction.</td>
</tr>
</table>
@ -220,7 +228,7 @@
<strong>LaraObject:SetPoison([poison])</strong>
</dt>
<dd>
Set player poison.
Set the player's poison value.
@ -228,7 +236,7 @@
<ul>
<li><span class="parameter">poison</span>
<span class="types"><span class="type">int</span></span>
Poison strength. Maximum value is 128 (default 0)
New poison value. <strong>default: 0, max: 128</strong>
<em>Optional.</em>
</li>
</ul>
@ -247,7 +255,7 @@
<strong>LaraObject:GetPoison()</strong>
</dt>
<dd>
Get poison potency of Lara.
Get the player's poison value.
@ -256,7 +264,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
Current poison potency.
Poison value.
</ol>
@ -272,7 +280,7 @@
<strong>LaraObject:SetAir(air)</strong>
</dt>
<dd>
Set air value of Lara.
Set the player's air value.
@ -280,7 +288,7 @@
<ul>
<li><span class="parameter">air</span>
<span class="types"><span class="type">int</span></span>
Air value to give Lara. Maximum value is 1800.
New air value. <strong>max: 1800</strong>
</li>
</ul>
@ -298,7 +306,7 @@
<strong>LaraObject:GetAir()</strong>
</dt>
<dd>
Get air value of Lara.
Get the player's air value.
@ -307,7 +315,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
Current air value.
Air value.
</ol>
@ -323,7 +331,7 @@
<strong>LaraObject:SetWet(wetness)</strong>
</dt>
<dd>
Set wetness value of Lara (causes dripping).
Set the player's wetness value, causing drips.
@ -331,7 +339,7 @@
<ul>
<li><span class="parameter">wetness</span>
<span class="types"><span class="type">int</span></span>
Wetness value. Maximum value is 255.
New wetness value. <strong>max: 255</strong>
</li>
</ul>
@ -349,7 +357,7 @@
<strong>LaraObject:GetWet()</strong>
</dt>
<dd>
Get wetness value of Lara.
Get the player's wetness value.
@ -358,7 +366,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
Current wetness value.
Wetness value.
</ol>
@ -371,18 +379,18 @@
</dd>
<dt>
<a name = "LaraObject:SetStamina"></a>
<strong>LaraObject:SetStamina(stamina)</strong>
<strong>LaraObject:SetStamina(New)</strong>
</dt>
<dd>
Set sprint energy value of Lara.
Set the player's stamina value.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">stamina</span>
<li><span class="parameter">New</span>
<span class="types"><span class="type">int</span></span>
Stamina to give to Lara. Maximum value is 120.
stamina value. <strong>max: 120</strong>
</li>
</ul>
@ -400,7 +408,7 @@
<strong>LaraObject:GetStamina()</strong>
</dt>
<dd>
Get stamina value of Lara.
Get the player's stamina value.
@ -409,7 +417,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
Current sprint value.
Stamina value.
</ol>
@ -425,7 +433,7 @@
<strong>Moveable:GetAirborne()</strong>
</dt>
<dd>
Get the moveable's airborne status.
Get the player's airborne status (set when jumping and falling).
@ -434,7 +442,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
True if Lara state must react to aerial forces.
True if airborne, otherwise false.
</ol>
@ -446,7 +454,7 @@
<strong>Moveable:SetAirborne(airborne)</strong>
</dt>
<dd>
Set the moveable's airborne status.
Set the player's airborne status.
@ -454,7 +462,7 @@
<ul>
<li><span class="parameter">airborne</span>
<span class="types"><span class="type">bool</span></span>
New airborne status for Lara.
New airborne status.
</li>
</ul>
@ -468,7 +476,7 @@
<strong>LaraObject:UndrawWeapon()</strong>
</dt>
<dd>
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.
@ -483,11 +491,11 @@
</dd>
<dt>
<a name = "LaraObject:ThrowAwayTorch"></a>
<strong>LaraObject:ThrowAwayTorch()</strong>
<a name = "LaraObject:DiscardTorch"></a>
<strong>LaraObject:DiscardTorch()</strong>
</dt>
<dd>
Lara will throw away the torch if she currently holds one in her hand.
Discard a held torch.
@ -497,7 +505,7 @@
<h3>Usage:</h3>
<ul>
<pre class="example">Lara:ThrowAwayTorch()</pre>
<pre class="example">Lara:DiscardTorch()</pre>
</ul>
</dd>
@ -506,7 +514,7 @@
<strong>LaraObject:GetHandStatus()</strong>
</dt>
<dd>
Get actual hand status of Lara.
Get the player's hand status.
@ -515,7 +523,7 @@
<ol>
<span class="types"><a class="type" href="../4 enums/Objects.HandStatus.html#">HandStatus</a></span>
Current hand status.
Hand status.
</ol>
@ -531,7 +539,7 @@
<strong>LaraObject:GetWeaponType()</strong>
</dt>
<dd>
Get actual weapon type of Lara.
Get the player's weapon type.
@ -556,7 +564,7 @@
<strong>LaraObject:SetWeaponType(weaponType, activate)</strong>
</dt>
<dd>
Set Lara weapon type.
Set the player's weapon type.
@ -645,7 +653,7 @@
<ol>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
current vehicle (nil if no vehicle present).
Current vehicle (nil if no vehicle present).
</ol>
@ -707,11 +715,11 @@
</dd>
<dt>
<a name = "LaraObject:TorchIsLit"></a>
<strong>LaraObject:TorchIsLit()</strong>
<a name = "LaraObject:IsTorchLit"></a>
<strong>LaraObject:IsTorchLit()</strong>
</dt>
<dd>
Get current light state of the torch, if it exists
Check if a held torch is lit.
@ -720,16 +728,122 @@
<ol>
<span class="types"><span class="type">bool</span></span>
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).
</ol>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> torchIsLit = Lara:TorchIsLit()</pre>
<pre class="example"><span class="keyword">local</span> isTorchLit = Lara:IsTorchLit()</pre>
</ul>
</dd>
<dt>
<a name = "LaraObject:Interact"></a>
<strong>LaraObject:Interact(mov, [animNumber], [offset], [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint], [actionID])</strong>
</dt>
<dd>
Align the player with a moveable object for interaction.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">mov</span>
<span class="types"><span class="type">Moveable</span></span>
Moveable object to align the player with.
</li>
<li><span class="parameter">animNumber</span>
<span class="types"><span class="type">int</span></span>
The animation to play after alignment is complete.
<em>Default: 197 (BUTTON_PUSH).</em>
</li>
<li><span class="parameter">offset</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Relative position offset from the moveable.
<em>Default: Vec3(0&#44; 0&#44; 312).</em>
</li>
<li><span class="parameter">minOffsetConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Minimum relative offset constraint.
<em>Default: Vec3(-256&#44; -512&#44; 0).</em>
</li>
<li><span class="parameter">maxOffsetConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Maximum relative offset constraint.
<em>Default: Vec3(256&#44; 0&#44; 512).</em>
</li>
<li><span class="parameter">minRotConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Minimum relative rotation constraint.
<em>Default: Rotation(-10&#44; -40&#44; -10).</em>
</li>
<li><span class="parameter">maxRotConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Maximum relative rotation constraint.
<em>Default: Rotation(10&#44; 40&#44; 10).</em>
</li>
<li><span class="parameter">actionID</span>
<span class="types"><a class="type" href="../4 enums/Input.ActionID.html#">ActionID</a></span>
Input action ID to trigger the alignment.
<em>Default: Input.ActionID.ACTION.</em>
</li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example"><span class="keyword">local</span> Lara:Interact(
moveable, <span class="number">197</span>,
Vec3(<span class="number">0</span>, <span class="number">0</span>, <span class="number">312</span>), Vec3(-<span class="number">256</span>, -<span class="number">512</span>, -<span class="number">256</span>), Vec3(<span class="number">256</span>, <span class="number">0</span>, <span class="number">512</span>),
Rotation(-<span class="number">10</span>, -<span class="number">30</span>, -<span class="number">10</span>), Rotation(<span class="number">10</span>, <span class="number">30</span>, <span class="number">10</span>), TEN.Input.ActionID.ACTION)</pre>
</ul>
</dd>
<dt>
<a name = "LaraObject:TestInteraction"></a>
<strong>LaraObject:TestInteraction(mov, [minOffsetConstraint], [maxOffsetConstraint], [minRotConstraint], [maxRotConstraint])</strong>
</dt>
<dd>
Test the player against a moveable object for interaction.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">mov</span>
<span class="types"><span class="type">Moveable</span></span>
Moveable object to align the player with.
</li>
<li><span class="parameter">minOffsetConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Minimum relative offset constraint.
<em>Default: Vec3(-256&#44; -512&#44; 0).</em>
</li>
<li><span class="parameter">maxOffsetConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Maximum relative offset constraint.
<em>Default: Vec3(256&#44; 0&#44; 512).</em>
</li>
<li><span class="parameter">minRotConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Minimum relative rotation constraint.
<em>Default: Rotation(-10&#44; -40&#44; -10).</em>
</li>
<li><span class="parameter">maxRotConstraint</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Maximum relative rotation constraint.
<em>Default: Rotation(10&#44; 40&#44; 10).</em>
</li>
</ul>
</dd>
</dl>

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -125,27 +125,27 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#SoundSource:GetPosition">SoundSource:GetPosition()</a></td>
<td class="summary">Get the sound source's position</td>
<td class="summary">Get the sound source's position.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:SetPosition">SoundSource:SetPosition(position)</a></td>
<td class="summary">Set the sound source's position</td>
<td class="summary">Set the sound source's position.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:GetName">SoundSource:GetName()</a></td>
<td class="summary">Get the sound source's unique string identifier</td>
<td class="summary">Get the sound source's unique string identifier.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:SetName">SoundSource:SetName(name)</a></td>
<td class="summary">Set the sound source's name (its unique string identifier)</td>
<td class="summary">Set the sound source's unique string identifier.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:GetSoundID">SoundSource:GetSoundID()</a></td>
<td class="summary">Get the sound source's unique int identifier</td>
<td class="summary">Get the sound source's sound ID.</td>
</tr>
<tr>
<td class="name" ><a href="#SoundSource:SetSoundID">SoundSource:SetSoundID(name)</a></td>
<td class="summary">Set the sound source's ID</td>
<td class="summary">Set the sound source's ID.</td>
</tr>
</table>
@ -161,7 +161,7 @@
<strong>SoundSource:GetPosition()</strong>
</dt>
<dd>
Get the sound source's position
Get the sound source's position.
@ -170,7 +170,7 @@
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
a copy of the sound source's position
Sound source's position.
</ol>
@ -182,7 +182,7 @@
<strong>SoundSource:SetPosition(position)</strong>
</dt>
<dd>
Set the sound source's position
Set the sound source's position.
@ -190,7 +190,7 @@
<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 sound source
The new position of the sound source.
</li>
</ul>
@ -204,7 +204,7 @@
<strong>SoundSource:GetName()</strong>
</dt>
<dd>
Get the sound source's unique string identifier
Get the sound source's unique string identifier.
@ -213,7 +213,7 @@
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the sound source's name
The sound source's name.
</ol>
@ -225,7 +225,7 @@
<strong>SoundSource:SetName(name)</strong>
</dt>
<dd>
Set the sound source's name (its unique string identifier)
Set the sound source's unique string identifier.
@ -233,7 +233,7 @@
<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 sound source's new name
The sound source's new name.
</li>
</ul>
@ -247,7 +247,7 @@
<strong>SoundSource:GetSoundID()</strong>
</dt>
<dd>
Get the sound source's unique int identifier
Get the sound source's sound ID.
@ -256,7 +256,7 @@
<ol>
<span class="types"><span class="type">int</span></span>
the ID of the sound
The ID of the sound.
</ol>
@ -268,7 +268,7 @@
<strong>SoundSource:SetSoundID(name)</strong>
</dt>
<dd>
Set the sound source's ID
Set the sound source's ID.
@ -276,7 +276,7 @@
<ul>
<li><span class="parameter">name</span>
<span class="types"><span class="type">int</span></span>
The sound source's new name
The sound source's new sound ID.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -381,7 +381,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
Status. <strong>true: visible</strong>, <strong>false: invisible</strong>
Status. true means visible, false otherwise.
</ol>
@ -402,7 +402,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
Collision status. <strong>true: can be collided with</strong>, <strong>false: no collision</strong>
Collision status. true if can be collided with, false otherwise.
</ol>
@ -423,7 +423,7 @@
<ol>
<span class="types"><span class="type">bool</span></span>
Solid Status. <strong>true: solid</strong>, <strong>false: soft</strong>
Solid Status. true if solid, false if soft.
</ol>
@ -597,7 +597,7 @@
<ul>
<li><span class="parameter">status</span>
<span class="types"><span class="type">bool</span></span>
New status. <strong>true: solid</strong>, <strong>false: soft</strong>
New status, true is solid, false is soft.
</li>
</ul>
@ -619,7 +619,7 @@
<ul>
<li><span class="parameter">collidable</span>
<span class="types"><span class="type">bool</span></span>
New collision status. <strong>true: can be collided with</strong>, <strong>false: no collision</strong>
New collision status. true if can be collided with, false: no collision.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -160,7 +160,7 @@
<td class="summary">Determine if this volume is active.</td>
</tr>
<tr>
<td class="name" ><a href="#Volume:IsMoveableInside">Volume:IsMoveableInside(Moveable)</a></td>
<td class="name" ><a href="#Volume:IsMoveableInside">Volume:IsMoveableInside(moveable)</a></td>
<td class="summary">Determine if a moveable is inside this volume.</td>
</tr>
<tr>
@ -189,7 +189,7 @@
<strong>Volume:GetName()</strong>
</dt>
<dd>
Get the unique string identifier of this volume. ()
Get the unique string identifier of this volume.
@ -210,7 +210,7 @@
<strong>Volume:GetPosition()</strong>
</dt>
<dd>
Get the position of this volume. ()
Get the position of this volume.
@ -231,7 +231,7 @@
<strong>Volume:GetRotation()</strong>
</dt>
<dd>
Get the rotation of this volume. ()
Get the rotation of this volume.
@ -252,7 +252,7 @@
<strong>Volume:GetScale()</strong>
</dt>
<dd>
Get this scale of this volume. ()
Get this scale of this volume.
@ -273,7 +273,7 @@
<strong>Volume:SetName(name)</strong>
</dt>
<dd>
Set the unique string identifier of this volume. ()
Set the unique string identifier of this volume.
@ -295,7 +295,7 @@
<strong>Volume:SetPosition(pos)</strong>
</dt>
<dd>
Set the position of this volume. ()
Set the position of this volume.
@ -317,7 +317,7 @@
<strong>Volume:SetRotation(rot)</strong>
</dt>
<dd>
Set the rotation of this volume. ()
Set the rotation of this volume.
@ -339,7 +339,7 @@
<strong>Volume:SetScale(scale)</strong>
</dt>
<dd>
Set the scale of the volume. ()
Set the scale of the volume.
@ -361,7 +361,7 @@
<strong>Volume:GetActive()</strong>
</dt>
<dd>
Determine if this volume is active. ()
Determine if this volume is active.
@ -379,18 +379,18 @@
</dd>
<dt>
<a name = "Volume:IsMoveableInside"></a>
<strong>Volume:IsMoveableInside(Moveable)</strong>
<strong>Volume:IsMoveableInside(moveable)</strong>
</dt>
<dd>
Determine if a moveable is inside this volume. ()
Determine if a moveable is inside this volume.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Moveable</span>
<li><span class="parameter">moveable</span>
<span class="types"><a class="type" href="../2 classes/Objects.Moveable.html#">Moveable</a></span>
to be checked for containment.
Moveable to be checked for containment.
</li>
</ul>
@ -410,7 +410,7 @@
<strong>Volume:Enable()</strong>
</dt>
<dd>
Enable this volume. ()
Enable this volume.
@ -425,7 +425,7 @@
<strong>Volume:Disable()</strong>
</dt>
<dd>
Disable this volume. ()
Disable this volume.
@ -440,7 +440,7 @@
<strong>Volume:ClearActivators()</strong>
</dt>
<dd>
Clear the activators for this volume, allowing it to trigger again. ()
Clear the activators for this volume, allowing it to trigger again.

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -129,23 +129,23 @@ when you need to use screen-space coordinates.</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#DisplayString">DisplayString(string, Position, [scale], [color], [translated], table)</a></td>
<td class="name" ><a href="#DisplayString">DisplayString(string, position, [scale], [color], [translated], [flags])</a></td>
<td class="summary">Create a DisplayString.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:GetColor">DisplayString:GetColor()</a></td>
<td class="summary">Get the display string's color</td>
<td class="summary">Get the display string's color.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:SetColor">DisplayString:SetColor(color)</a></td>
<td class="summary">Set the display string's color</td>
<td class="summary">Set the display string's color.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:GetKey">DisplayString:GetKey()</a></td>
<td class="summary">Get the string key to use.</td>
<td class="summary">Get the string key.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:SetKey">DisplayString:SetKey(string)</a></td>
<td class="name" ><a href="#DisplayString:SetKey">DisplayString:SetKey(key)</a></td>
<td class="summary">Set the string key to use.</td>
</tr>
<tr>
@ -166,11 +166,7 @@ when you need to use screen-space coordinates.</p>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:SetFlags">DisplayString:SetFlags(table)</a></td>
<td class="summary">Set the display string's flags</td>
</tr>
<tr>
<td class="name" ><a href="#DisplayString:SetTranslated">DisplayString:SetTranslated(shouldTranslate)</a></td>
<td class="summary">Set translated parameter of the string</td>
<td class="summary">Set the display string's flags.</td>
</tr>
</table>
@ -183,7 +179,7 @@ when you need to use screen-space coordinates.</p>
<dl class="function">
<dt>
<a name = "DisplayString"></a>
<strong>DisplayString(string, Position, [scale], [color], [translated], table)</strong>
<strong>DisplayString(string, position, [scale], [color], [translated], [flags])</strong>
</dt>
<dd>
Create a DisplayString.
@ -197,29 +193,30 @@ For use in <a href="../1 modules/Strings.html#ShowString">ShowString</a> and <a
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
The string to display or key of the translated string.
</li>
<li><span class="parameter">Position</span>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
of the string in pixel coordinates.
Position of the string in pixel coordinates.
</li>
<li><span class="parameter">scale</span>
<span class="types"><span class="type">float</span></span>
size of the string, relative to the default size. <strong>Default: 1.0</strong>
<em>Optional.</em>
Size of the string, relative to the default size.
<em>Default: 1.</em>
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
the color of the text. <strong>Default: white</strong>
<em>Optional.</em>
The color of the text.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
<li><span class="parameter">translated</span>
<span class="types"><span class="type">bool</span></span>
If false or omitted, the input string argument will be displayed.
If true, the string argument will be the key of a translated string specified in strings.lua. <strong>Default: false</strong>.
<em>Optional.</em>
If true, the string argument will be the key of a translated string specified in strings.lua.
<em>Default: false.</em>
</li>
<li><span class="parameter">table</span>
<li><span class="parameter">flags</span>
<span class="types"><a class="type" href="../4 enums/Strings.DisplayStringOption.html#">DisplayStringOption</a></span>
<strong>Default: None.</strong> <em>Please note that Strings are automatically aligned to the LEFT</em>
Flags which affect visual representation of a string, such as shadow or alignment.
<em>Optional.</em>
</li>
</ul>
@ -239,7 +236,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:GetColor()</strong>
</dt>
<dd>
Get the display string's color
Get the display string's color.
@ -248,7 +245,7 @@ If true, the string argument will be the key of a translated string specified in
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
a copy of the display string's color
Display string's color.
</ol>
@ -260,7 +257,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:SetColor(color)</strong>
</dt>
<dd>
Set the display string's color
Set the display string's color.
@ -268,7 +265,7 @@ If true, the string argument will be the key of a translated string specified in
<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 display string
The new color of the display string.
</li>
</ul>
@ -282,9 +279,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:GetKey()</strong>
</dt>
<dd>
Get the string key to use. If <code>isTranslated</code> is true when <a href="../2 classes/Strings.DisplayString.html#DisplayString">DisplayString</a>
is called, this will be the string key for the translation that will be displayed.
If false or omitted, this will be the string that's displayed.()
Get the string key.
@ -293,7 +288,7 @@ If true, the string argument will be the key of a translated string specified in
<ol>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the string to use
The string key.
</ol>
@ -302,20 +297,18 @@ If true, the string argument will be the key of a translated string specified in
</dd>
<dt>
<a name = "DisplayString:SetKey"></a>
<strong>DisplayString:SetKey(string)</strong>
<strong>DisplayString:SetKey(key)</strong>
</dt>
<dd>
Set the string key to use. If <code>isTranslated</code> is true when <a href="../2 classes/Strings.DisplayString.html#DisplayString">DisplayString</a>
is called, this will be the string key for the translation that will be displayed.
If false or omitted, this will be the string that's displayed.()
Set the string key to use.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<li><span class="parameter">key</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the new key for the display string
The new key for the display string.
</li>
</ul>
@ -329,7 +322,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:SetScale(scale)</strong>
</dt>
<dd>
Set the scale of the string. ()
Set the scale of the string.
@ -351,7 +344,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:GetScale()</strong>
</dt>
<dd>
Get the scale of the string. ()
Get the scale of the string.
@ -373,7 +366,7 @@ If true, the string argument will be the key of a translated string specified in
</dt>
<dd>
Set the position of the string.
Screen-space coordinates are expected.()
Screen-space coordinates are expected.
@ -396,7 +389,7 @@ If true, the string argument will be the key of a translated string specified in
</dt>
<dd>
Get the position of the string.
Screen-space coordinates are returned.()
Screen-space coordinates are returned.
@ -417,7 +410,7 @@ If true, the string argument will be the key of a translated string specified in
<strong>DisplayString:SetFlags(table)</strong>
</dt>
<dd>
Set the display string's flags ()
Set the display string's flags.
@ -425,7 +418,7 @@ If true, the string argument will be the key of a translated string specified in
<ul>
<li><span class="parameter">table</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.6">table</a></span>
the new table with display flags options
The new table with display flags options.
</li>
</ul>
@ -444,29 +437,6 @@ varDisplayString:SetFlags({ TEN.Strings.DisplayStringOption.SHADOW, TEN.Strings.
</span>varDisplayString:SetFlags{ TEN.Strings.DisplayStringOption.CENTER }</pre>
</ul>
</dd>
<dt>
<a name = "DisplayString:SetTranslated"></a>
<strong>DisplayString:SetTranslated(shouldTranslate)</strong>
</dt>
<dd>
Set translated parameter of the string
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">shouldTranslate</span>
<span class="types"><span class="type">bool</span></span>
if true, the string's key will be used as the key for the translation that will be displayed.
If false, the key itself will be displayed
</li>
</ul>
</dd>
</dl>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -124,11 +124,11 @@
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#DisplaySprite">DisplaySprite(ID, int, pos, rot, scale, [color])</a></td>
<td class="name" ><a href="#DisplaySprite">DisplaySprite(objectID, index, pos, rot, scale, [color])</a></td>
<td class="summary">Create a DisplaySprite object.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite">DisplaySprite(pos, rot, scale[, color])</a></td>
<td class="name" ><a href="#DisplaySprite">DisplaySprite(pos, rot, scale, [color])</a></td>
<td class="summary">Create a DisplaySprite object with a video image.</td>
</tr>
<tr>
@ -156,27 +156,27 @@
<td class="summary">Get the color of the display sprite.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetObjectID">DisplaySprite:SetObjectID(New)</a></td>
<td class="name" ><a href="#DisplaySprite:SetObjectID">DisplaySprite:SetObjectID(objectID)</a></td>
<td class="summary">Set the sprite sequence object ID used by the display sprite.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetSpriteID">DisplaySprite:SetSpriteID(New)</a></td>
<td class="name" ><a href="#DisplaySprite:SetSpriteID">DisplaySprite:SetSpriteID(spriteID)</a></td>
<td class="summary">Set the sprite ID in the sprite sequence object used by the display sprite.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetPosition">DisplaySprite:SetPosition(New)</a></td>
<td class="name" ><a href="#DisplaySprite:SetPosition">DisplaySprite:SetPosition(position)</a></td>
<td class="summary">Set the display position of the display sprite in percent.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetRotation">DisplaySprite:SetRotation(New)</a></td>
<td class="name" ><a href="#DisplaySprite:SetRotation">DisplaySprite:SetRotation(rotation)</a></td>
<td class="summary">Set the rotation of the display sprite in degrees.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetScale">DisplaySprite:SetScale(New)</a></td>
<td class="name" ><a href="#DisplaySprite:SetScale">DisplaySprite:SetScale(scale)</a></td>
<td class="summary">Set the horizontal and vertical scale of the display sprite in percent.</td>
</tr>
<tr>
<td class="name" ><a href="#DisplaySprite:SetColor">DisplaySprite:SetColor(New)</a></td>
<td class="name" ><a href="#DisplaySprite:SetColor">DisplaySprite:SetColor(color)</a></td>
<td class="summary">Set the color of the display sprite.</td>
</tr>
<tr>
@ -194,7 +194,7 @@
<dl class="function">
<dt>
<a name = "DisplaySprite"></a>
<strong>DisplaySprite(ID, int, pos, rot, scale, [color])</strong>
<strong>DisplaySprite(objectID, index, pos, rot, scale, [color])</strong>
</dt>
<dd>
Create a DisplaySprite object.
@ -203,13 +203,13 @@
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ID</span>
<li><span class="parameter">objectID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
of the sprite sequence object.
ID of the sprite sequence object.
</li>
<li><span class="parameter">int</span>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
spriteID ID of the sprite in the sequence.
Index of the sprite in the sequence.
</li>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
@ -225,8 +225,8 @@
</li>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color. <strong>Default: Color(255, 255, 255, 255)</strong>
<em>Optional.</em>
Color.
<em>Default: Color(255&#44; 255&#44; 255).</em>
</li>
</ul>
@ -243,7 +243,7 @@
</dd>
<dt>
<a name = "DisplaySprite"></a>
<strong>DisplaySprite(pos, rot, scale[, color])</strong>
<strong>DisplaySprite(pos, rot, scale, [color])</strong>
</dt>
<dd>
Create a DisplaySprite object with a video image.
@ -268,7 +268,7 @@
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
Color. <strong>Default: Color(255, 255, 255, 255)</strong>
(<em>optional</em>)
<em>Optional.</em>
</li>
</ul>
@ -288,7 +288,7 @@
<strong>DisplaySprite:GetObjectID()</strong>
</dt>
<dd>
Get the object ID of the sprite sequence object used by the display sprite. ()
Get the object ID of the sprite sequence object used by the display sprite.
@ -309,7 +309,7 @@
<strong>DisplaySprite:GetSpriteID()</strong>
</dt>
<dd>
Get the sprite ID in the sprite sequence object used by the display sprite. ()
Get the sprite ID in the sprite sequence object used by the display sprite.
@ -330,7 +330,7 @@
<strong>DisplaySprite:GetPosition()</strong>
</dt>
<dd>
Get the display position of the display sprite in percent. ()
Get the display position of the display sprite in percent.
@ -351,7 +351,7 @@
<strong>DisplaySprite:GetRotation()</strong>
</dt>
<dd>
Get the rotation of the display sprite in degrees. ()
Get the rotation of the display sprite in degrees.
@ -372,7 +372,7 @@
<strong>DisplaySprite:GetScale()</strong>
</dt>
<dd>
Get the horizontal and vertical scale of the display sprite in percent. ()
Get the horizontal and vertical scale of the display sprite in percent.
@ -393,7 +393,7 @@
<strong>DisplaySprite:GetColor()</strong>
</dt>
<dd>
Get the color of the display sprite. ()
Get the color of the display sprite.
@ -411,18 +411,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetObjectID"></a>
<strong>DisplaySprite:SetObjectID(New)</strong>
<strong>DisplaySprite:SetObjectID(objectID)</strong>
</dt>
<dd>
Set the sprite sequence object ID used by the display sprite. (Objects.ObjID.SpriteConstants)
Set the sprite sequence object ID used by the display sprite.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">objectID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
sprite sequence object ID.
New sprite sequence object ID.
</li>
</ul>
@ -433,18 +433,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetSpriteID"></a>
<strong>DisplaySprite:SetSpriteID(New)</strong>
<strong>DisplaySprite:SetSpriteID(spriteID)</strong>
</dt>
<dd>
Set the sprite ID in the sprite sequence object used by the display sprite. (int)
Set the sprite ID in the sprite sequence object used by the display sprite.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">spriteID</span>
<span class="types"><span class="type">int</span></span>
sprite ID in the sprite sequence object.
New sprite ID in the sprite sequence object.
</li>
</ul>
@ -455,18 +455,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetPosition"></a>
<strong>DisplaySprite:SetPosition(New)</strong>
<strong>DisplaySprite:SetPosition(position)</strong>
</dt>
<dd>
Set the display position of the display sprite in percent. (Vec2)
Set the display position of the display sprite in percent.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">position</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
display position in percent.
New display position in percent.
</li>
</ul>
@ -477,18 +477,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetRotation"></a>
<strong>DisplaySprite:SetRotation(New)</strong>
<strong>DisplaySprite:SetRotation(rotation)</strong>
</dt>
<dd>
Set the rotation of the display sprite in degrees. (float)
Set the rotation of the display sprite in degrees.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">rotation</span>
<span class="types"><span class="type">float</span></span>
rotation in degrees.
New rotation in degrees.
</li>
</ul>
@ -499,18 +499,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetScale"></a>
<strong>DisplaySprite:SetScale(New)</strong>
<strong>DisplaySprite:SetScale(scale)</strong>
</dt>
<dd>
Set the horizontal and vertical scale of the display sprite in percent. (Vec2)
Set the horizontal and vertical scale of the display sprite in percent.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<li><span class="parameter">scale</span>
<span class="types"><span class="type">float</span></span>
horizontal and vertical scale in percent.
New horizontal and vertical scale in percent.
</li>
</ul>
@ -521,18 +521,18 @@
</dd>
<dt>
<a name = "DisplaySprite:SetColor"></a>
<strong>DisplaySprite:SetColor(New)</strong>
<strong>DisplaySprite:SetColor(color)</strong>
</dt>
<dd>
Set the color of the display sprite. (Color)
Set the color of the display sprite.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">New</span>
<span class="types"><span class="type">float</span></span>
color.
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
New color.
</li>
</ul>
@ -554,23 +554,23 @@
<ul>
<li><span class="parameter">priority</span>
<span class="types"><span class="type">int</span></span>
Draw priority. Can be thought of as a layer, with higher values having precedence. <strong>Default: 0</strong>
<em>Optional.</em>
Draw priority. Can be thought of as a layer, with higher values having precedence.
<em>Default: 0.</em>
</li>
<li><span class="parameter">alignMode</span>
<span class="types"><a class="type" href="../4 enums/View.AlignMode.html#">AlignMode</a></span>
Align mode interpreting an offset from the sprite's position. <strong>Default: View.AlignMode.CENTER</strong>
<em>Optional.</em>
Align mode interpreting an offset from the sprite's position.
<em>Default: View.AlignMode.CENTER.</em>
</li>
<li><span class="parameter">scaleMode</span>
<span class="types"><a class="type" href="../4 enums/View.ScaleMode.html#">ScaleMode</a></span>
Scale mode interpreting the display sprite's horizontal and vertical scale. <strong>Default: View.ScaleMode.FIT</strong>
<em>Optional.</em>
Scale mode interpreting the display sprite's horizontal and vertical scale.
<em>Default: View.ScaleMode.FIT.</em>
</li>
<li><span class="parameter">blendMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
Blend mode. <strong>Default: Effects.BlendID.ALPHABLEND</strong>
<em>Optional.</em>
Blend mode.
<em>Default: Effects.BlendID.ALPHABLEND.</em>
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -240,15 +240,15 @@
<ul>
<li><span class="parameter">R</span>
<span class="types"><span class="type">int</span></span>
red component
Red component.
</li>
<li><span class="parameter">G</span>
<span class="types"><span class="type">int</span></span>
green component
Green component.
</li>
<li><span class="parameter">B</span>
<span class="types"><span class="type">int</span></span>
blue component
Blue component.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -221,11 +221,11 @@
</li>
<li><span class="parameter">min</span>
<span class="types"><span class="type">int</span></span>
Distance at which fog starts (in sectors)
Distance at which fog starts (in sectors).
</li>
<li><span class="parameter">max</span>
<span class="types"><span class="type">int</span></span>
Distance at which fog reaches the maximum strength (in sectors)
Distance at which fog reaches the maximum strength (in sectors).
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -147,8 +147,7 @@
<ul>
<li><span class="parameter">nameKey</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
key for the item's (localised) name.<br />
Corresponds to an entry in strings.lua.
key for the item's (localised) name. Corresponds to an entry in strings.lua.
</li>
<li><span class="parameter">objectID</span>
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
@ -167,7 +166,7 @@ and a value of 2 will cause the item to render at twice the size.
</li>
<li><span class="parameter">rot</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
rotation around x, y, and z axes
rotation around x, y, and z axes.
</li>
<li><span class="parameter">axis</span>
<span class="types"><span class="type">RotationAxis</span></span>
@ -182,7 +181,7 @@ Z
</li>
<li><span class="parameter">meshBits</span>
<span class="types"><span class="type">int</span></span>
<strong>Not currently implemented</strong> (will have no effect regardless of what you set it to)
<em>Not currently implemented</em> (will have no effect regardless of what you set it to).
</li>
<li><span class="parameter">action</span>
<span class="types"><span class="type">ItemAction</span></span>
@ -201,7 +200,7 @@ EXAMINE
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Flow.InventoryItem.html#InventoryItem">InventoryItem</a></span>
an InventoryItem
an InventoryItem.
</ol>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -123,11 +123,11 @@
<table class="function_list">
<tr>
<td class="name" ><a href="#color">color</a></td>
<td class="summary">(<a href="../3 primitive classes/Color.html#">Color</a>) RGB sky color</td>
<td class="summary">(<a href="../3 primitive classes/Color.html#">Color</a>) RGB sky color.</td>
</tr>
<tr>
<td class="name" ><a href="#speed">speed</a></td>
<td class="summary">(int) cloud speed.</td>
<td class="summary">(int) Cloud speed.</td>
</tr>
</table>
<h2><a href="#Functions">Functions</a></h2>
@ -152,7 +152,7 @@
<strong>color</strong>
</dt>
<dd>
(<a href="../3 primitive classes/Color.html#">Color</a>) RGB sky color
(<a href="../3 primitive classes/Color.html#">Color</a>) RGB sky color.
@ -167,7 +167,7 @@
<strong>speed</strong>
</dt>
<dd>
(int) cloud speed. </p>
(int) Cloud speed. </p>
<pre><code> Values can be between [-32768, 32767], with positive numbers resulting in a sky that scrolls from
west to east, and negative numbers resulting in one that travels east to west.
@ -205,11 +205,11 @@
<ul>
<li><span class="parameter">color</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
RGB color
RGB color.
</li>
<li><span class="parameter">speed</span>
<span class="types"><span class="type">int</span></span>
cloud speed
Cloud speed.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -281,7 +281,7 @@
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">StarField</span></span>
<span class="types"><a class="type" href="../3 primitive classes/Flow.Starfield.html#Starfield">Starfield</a></span>
A new Starfield object.
</ol>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -142,7 +142,10 @@
</dt>
<dd>
<p>Table of MaterialType constants. To be used with <a href="../2 classes/Collision.Probe.html#GetFloorMaterialType">Collision.Probe.GetFloorMaterialType</a> and <a href="../2 classes/Collision.Probe.html#GetCeilingMaterialType">Collision.Probe.GetCeilingMaterialType</a>.</p>
<p>Table of MaterialType constants.
<br>
Corresponds to Tomb Editor texture sound material types.
To be used with <a href="../2 classes/Collision.Probe.html#GetFloorMaterialType">Collision.Probe.GetFloorMaterialType</a> and <a href="../2 classes/Collision.Probe.html#GetCeilingMaterialType">Collision.Probe.GetCeilingMaterialType</a>.</p>
<ul>
<li><code>MUD</code></li>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -142,18 +142,20 @@
</dt>
<dd>
<p>Table of Effects.BlendID constants. </p>
<p>Table of Effects.BlendID constants.
<br>
All blending modes except <code>OPAQUE</code>, <code>ADDITIVE</code> and <code>ALPHA_BLEND</code> will use depth sorting for applicable polygons.
This may reduce engine performance, so it is preferable to minimize usage of other blending modes.</p>
<ul>
<li><code>OPAQUE</code></li>
<li><code>ALPHA_TEST</code></li>
<li><code>ADDITIVE</code></li>
<li><code>NO_DEPTH_TEST</code></li>
<li><code>SUBTRACTIVE</code></li>
<li><code>EXCLUDE</code></li>
<li><code>SCREEN</code></li>
<li><code>LIGHTEN</code></li>
<li><code>ALPHA_BLEND</code></li>
<li><code>OPAQUE</code> - No transparency.</li>
<li><code>ALPHA_TEST</code> - So called "magenta transparency", every pixel can be either fully transparent or opaque.</li>
<li><code>ADDITIVE</code> - Standard additive blending.</li>
<li><code>SUBTRACTIVE</code> - Subtractive blending, with brighter texture areas making everything darker behind them.</li>
<li><code>EXCLUDE</code> - Produces "inversion" effect.</li>
<li><code>SCREEN</code> - Similar to <code>ADDITIVE</code>, but without excessive overbright.</li>
<li><code>LIGHTEN</code> - Similar to <code>SCREEN</code>, but with a little different blending formula.</li>
<li><code>ALPHA_BLEND</code> - True alpha blending. Should be used for textures with gradually changing alpha values.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -146,12 +146,12 @@
<p> The following constants are inside Flow.ErrorMode: <br></p>
<ul>
<li><p><code>TERMINATE</code> - print to the log file and return to the title level when any script error is hit.
This is the one you will want to go for if you want to know IMMEDIATELY if something has gone wrong.</p></li>
<li><p><code>WARN</code> - print to the log file and continue running the application when a recoverable script error is hit.
<li><p><code>TERMINATE</code> - Print to the log file and return to the title level when any script error is hit.
This is the one you will want to go for if you want to know <em>immediately</em> if something has gone wrong.</p></li>
<li><p><code>WARN</code> - Print to the log file and continue running the application when a recoverable script error is hit.
Choose this one if booting to the title level is too much for you.</p></li>
<li><p><code>SILENT</code> - do nothing when a recoverable script error is hit.
Think <strong>very</strong> carefully before using this setting. These error modes are here to help you to keep your scripts
<li><p><code>SILENT</code> - Do nothing when a recoverable script error is hit.
Think <em>very</em> carefully before using this setting. These error modes are here to help you to keep your scripts
working properly, but if you opt to ignore errors, you won't be alerted if you've misused a function or passed
an invalid argument.</p></li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -147,10 +147,10 @@
<p> To be used with <a href="../2 classes/Objects.Moveable.html#Moveable:GetStatus">Objects.Moveable.GetStatus</a> and <a href="../2 classes/Objects.Moveable.html#Moveable:SetStatus">Objects.Moveable.SetStatus</a> functions.</p>
<ul>
<li><code>INACTIVE</code> - moveable is inactive (was never activated).</li>
<li><code>ACTIVE</code> - moveable is active.</li>
<li><code>DEACTIVATED</code> - moveable is deactivated (was previously active and later deactivated).</li>
<li><code>INVISIBLE</code> - moveable is invisible.</li>
<li><code>INACTIVE</code> - Moveable is inactive (was never activated).</li>
<li><code>ACTIVE</code> - Moveable is active.</li>
<li><code>DEACTIVATED</code> - Moveable is deactivated (was previously active and later deactivated).</li>
<li><code>INVISIBLE</code> - Moveable is invisible.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -883,7 +883,7 @@ INVENTORY_PASSPORT
INVENTORY_SUNGLASSES
INVENTORY_KEYS
INVENTORY_HEADPHONES
INVENTORY_POLAROID
INVENTORY_PHOTO
SMOKE_EMITTER_WHITE
SMOKE_EMITTER_BLACK
SMOKE_EMITTER

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -143,7 +143,8 @@
<dd>
<p>Table of Objects.RoomFlagID constants.
To be used with <a href="../2 classes/Objects.Room.html#Room:SetFlag">Objects.Room.SetFlag</a> and <a href="../2 classes/Objects.Room.html#Room:GetFlag">Objects.Room.GetFlag</a> functions.</p>
<br>
Corresponds to room flags in Tomb Editor. To be used with <a href="../2 classes/Objects.Room.html#Room:SetFlag">Objects.Room.SetFlag</a> and <a href="../2 classes/Objects.Room.html#Room:GetFlag">Objects.Room.GetFlag</a> functions.</p>
<p>The following constants are inside RoomFlagID.</p>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -143,16 +143,16 @@
<dd>
<p>Table of Objects.RoomReverb constants.
To be used with <a href="../2 classes/Objects.Room.html#Room:GetReverbType">Objects.Room.GetReverbType</a> and <a href="../2 classes/Objects.Room.html#Room:SetReverbType">Objects.Room.SetReverbType</a> functions.</p>
<p>The following constants are inside RoomReverb.</p>
<br>
Corresponds to room reverb setting set in Tomb Editor. To be used with <a href="../2 classes/Objects.Room.html#Room:GetReverbType">Objects.Room.GetReverbType</a> and <a href="../2 classes/Objects.Room.html#Room:SetReverbType">Objects.Room.SetReverbType</a> functions.
The following constants are inside RoomReverb.</p>
<ul>
<li>OUTSIDE</li>
<li>SMALL</li>
<li>MEDIUM</li>
<li>LARGE</li>
<li>PIPE</li>
<li><code>OUTSIDE</code></li>
<li><code>SMALL</code></li>
<li><code>MEDIUM</code></li>
<li><code>LARGE</code></li>
<li><code>PIPE</code></li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -147,9 +147,9 @@
<p>To be used with sound track functions, such as <a href="../1 modules/Sound.html#PlayAudioTrack">Sound.PlayAudioTrack</a> and <a href="../1 modules/Sound.html#StopAudioTrack">Sound.StopAudioTrack</a>.</p>
<ul>
<li><code>ONESHOT</code> - used for one-time music tracks.</li>
<li><code>LOOPED</code> - used for looped ambience or music.</li>
<li><code>VOICE</code> - used for dialogs. Also supports subtitles, set by <a href="../1 modules/Sound.html#GetCurrentSubtitle">Sound.GetCurrentSubtitle</a> function.</li>
<li><code>ONESHOT</code> - Used for one-time music tracks.</li>
<li><code>LOOPED</code> - Used for looped ambience or music.</li>
<li><code>VOICE</code> - Used for dialogs. Also supports subtitles, set by <a href="../1 modules/Sound.html#GetCurrentSubtitle">Sound.GetCurrentSubtitle</a> function.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -145,10 +145,10 @@
<p>Strings.DisplayStringOption constants. To be used with <a href="../2 classes/Strings.DisplayString.html#">Strings.DisplayString</a> class.</p>
<ul>
<li><code>CENTER</code> - set the horizontal origin point to the center of the string.</li>
<li><code>RIGHT</code> - set the horizontal origin point to right of the string.</li>
<li><code>SHADOW</code> - gives the string a small drop shadow.</li>
<li><code>BLINK</code> - blinks the string</li>
<li><code>CENTER</code> - Set the horizontal origin point to the center of the string.</li>
<li><code>RIGHT</code> - Set the horizontal origin point to right of the string.</li>
<li><code>SHADOW</code> - Gives the string a small drop shadow.</li>
<li><code>BLINK</code> - Blinks the string.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -145,13 +145,13 @@
<p>Table of View.CameraType constants. To be used with <a href="../1 modules/View.html#GetCameraType">View.GetCameraType</a> function.</p>
<ul>
<li><code>NORMAL</code> - standard in-game camera when weapons are holstered.</li>
<li><code>COMBAT</code> - in-game camera when weapons are unholstered.</li>
<li><code>FIXED</code> - classic fixed camera.</li>
<li><code>LOOK</code> - look camera.</li>
<li><code>FLYBY</code> - flyby or tracking camera.</li>
<li><code>BINOCULARS</code> - binoculars is active.</li>
<li><code>LASERSIGHT</code> - lasersight is active.</li>
<li><code>NORMAL</code> - Standard in-game camera when weapons are holstered.</li>
<li><code>COMBAT</code> - In-game camera when weapons are unholstered.</li>
<li><code>FIXED</code> - Classic fixed camera.</li>
<li><code>LOOK</code> - Look camera.</li>
<li><code>FLYBY</code> - Flyby or tracking camera.</li>
<li><code>BINOCULARS</code> - Binocular camera.</li>
<li><code>LASERSIGHT</code> - Lasersight camera.</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -145,9 +145,9 @@
<p>Table of View.ScaleMode constants. To be used with <a href="../2 classes/View.DisplaySprite.html#">View.DisplaySprite</a> class.</p>
<ul>
<li><code>FIT</code></li>
<li><code>FILL</code></li>
<li><code>STRETCH</code>
<li><code>FIT</code> - Image will proportionally fit the whole image into the sprite surface.</li>
<li><code>FILL</code> - Image will scale up proportionally and crop to fill all sprite surface.</li>
<li><code>STRETCH</code> - Image will stretch according to sprite dimensions, not taking aspect ratio into consideration.
</li>
</ul>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
@ -294,7 +294,7 @@
</li>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
X,Y position of the bar's background in screen percent (0-100).
X,Y position of the diary background sprite in screen percent (0-100).
</li>
<li><span class="parameter">rot</span>
<span class="types"><span class="type">float</span></span>
@ -302,7 +302,7 @@
</li>
<li><span class="parameter">scale</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec2.html#">Vec2</a></span>
X,Y Scaling factor for the bar's background sprite.
X,Y Scaling factor for the diary background sprite.
</li>
<li><span class="parameter">alignMode</span>
<span class="types"><a class="type" href="../4 enums/View.AlignMode.html#">AlignMode</a></span>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

View file

@ -3,7 +3,7 @@
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.8.1 Lua API</title>
<title>TombEngine 1.8.2 Lua API</title>
<link rel="stylesheet" href="ldoc.css" type="text/css" />
</head>
<body>
@ -115,7 +115,7 @@
<div id="content">
<h2>TombEngine 1.8.1 scripting interface</h2>
<h2>TombEngine 1.8.2 scripting interface</h2>
<p>Welcome to the TombEngine scripting API.</p>
<p>Note that this is primarily a reference document, not a tutorial, so expect descriptions to be fairly sparse.
@ -208,7 +208,7 @@ local door = GetMoveableByName("door_type4_14")
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.LaraObject.html">Objects.LaraObject</a></td>
<td class="summary">Class for extra player-only functions.</td>
<td class="summary">Class for player-only functions.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.Moveable.html">Objects.Moveable</a></td>

View file

@ -6,7 +6,10 @@
// @enum Collision.MaterialType
// @pragma nostrip
/// Table of MaterialType constants. To be used with @{Collision.Probe.GetFloorMaterialType} and @{Collision.Probe.GetCeilingMaterialType}.
/// Table of MaterialType constants.
// <br>
// Corresponds to Tomb Editor texture sound material types.
// To be used with @{Collision.Probe.GetFloorMaterialType} and @{Collision.Probe.GetCeilingMaterialType}.
//
// - `MUD`
// - `SNOW`

View file

@ -9,16 +9,18 @@ namespace TEN::Scripting::Effects
// @pragma nostrip
/// Table of Effects.BlendID constants.
// <br>
// All blending modes except `OPAQUE`, `ADDITIVE` and `ALPHA_BLEND` will use depth sorting for applicable polygons.
// This may reduce engine performance, so it is preferable to minimize usage of other blending modes.
//
// - `OPAQUE`
// - `ALPHA_TEST`
// - `ADDITIVE`
// - `NO_DEPTH_TEST`
// - `SUBTRACTIVE`
// - `EXCLUDE`
// - `SCREEN`
// - `LIGHTEN`
// - `ALPHA_BLEND`
// - `OPAQUE` - No transparency.
// - `ALPHA_TEST` - So called "magenta transparency", every pixel can be either fully transparent or opaque.
// - `ADDITIVE` - Standard additive blending.
// - `SUBTRACTIVE` - Subtractive blending, with brighter texture areas making everything darker behind them.
// - `EXCLUDE` - Produces "inversion" effect.
// - `SCREEN` - Similar to `ADDITIVE`, but without excessive overbright.
// - `LIGHTEN` - Similar to `SCREEN`, but with a little different blending formula.
// - `ALPHA_BLEND` - True alpha blending. Should be used for textures with gradually changing alpha values.
//
// @table Effects.BlendID

View file

@ -46,19 +46,19 @@ using namespace TEN::Effects::Streamer;
using namespace TEN::Math;
using namespace TEN::Scripting::Types;
namespace TEN::Scripting::Effects
namespace TEN::Scripting::Effects
{
/// Emit a lightning arc.
/// Emit a lightning arc.
// @function EmitLightningArc
// @tparam Vec3 origin
// @tparam Vec3 target
// @tparam Color color (default Color(255, 255, 255))
// @tparam float life Lifetime in seconds. Clamped to [0, 4.233] for now because of strange internal maths. __default: 1__
// @tparam int amplitude "strength" of the lightning - the higher the value, the "taller" the arcs. Clamped to [1, 255]. __default: 20__
// @tparam int beamWidth Clamped to [1, 127]. __default 2__
// @tparam int detail Higher numbers equal more segments, but it's not a 1:1 correlation. Clamped to [1, 127]. __default: 10__
// @tparam bool smooth If true, the arc will have large, smooth curves; if false, it will have small, jagged spikes. __default: false__
// @tparam bool endDrift If true, the end of the arc will be able to gradually drift away from its destination in a random direction __default: false__
// @tparam[opt=Color(255&#44; 255&#44; 255)] Color color.
// @tparam[opt=1] float life Lifetime in seconds. Clamped to [0, 4.233] for now because of strange internal maths.
// @tparam[opt=20] int amplitude Strength of the lightning - the higher the value, the "taller" the arcs. Clamped to [1, 255].
// @tparam[opt=2] int beamWidth Beam width. Clamped to [1, 127].
// @tparam[opt=10] int detail Higher numbers equal more segments, but it's not a 1:1 correlation. Clamped to [1, 127].
// @tparam[opt=false] bool smooth If true, the arc will have large, smooth curves; if false, it will have small, jagged spikes.
// @tparam[opt=false] bool endDrift If true, the end of the arc will be able to gradually drift away from its destination in a random direction.
static void EmitLightningArc(const Vec3& origin, const Vec3& target, TypeOrNil<ScriptColor> color, TypeOrNil<float> life, TypeOrNil<int> amplitude,
TypeOrNil<int> beamWidth, TypeOrNil<int> segments, TypeOrNil<bool> smooth, TypeOrNil<bool> endDrift)
{
@ -113,18 +113,18 @@ namespace TEN::Scripting::Effects
// @tparam Vec3 pos World position.
// @tparam Vec3 vel Directional velocity.
// @tparam int spriteID Sprite ID in the sprite sequence slot.
// @tparam float gravity Effect of gravity. Positive value ascends, negative value descends. __default: 0__
// @tparam float rotVel Rotational velocity in degrees. __default: 0__
// @tparam Color startColor Color at start of life. __default: Color(255, 255, 255)__
// @tparam Color endColor Color at end of life. This will finish long before the end of the particle's life due to internal math. __default: Color(255, 255, 255)__
// @tparam Effects.BlendID blendMode Render blend mode. __TEN.Effects.BlendID.ALPHA_BLEND__
// @tparam float startSize Size at start of life. __default: 10__
// @tparam float endSize Size at end of life. __default: 0__
// @tparam float life Lifespan in seconds. __default: 2__
// @tparam bool damage Harm the player on collision. __default: false__
// @tparam bool poison Poison the player on collision. __default: false__
// @tparam Objects.ObjID.SpriteConstants spriteSeqID Sprite sequence slot ID. __default: Objects.ObjID.DEFAULT_SPRITES__
// @tparam float startRot Rotation at start of life. __default: random__
// @tparam[opt=0] float gravity Effect of gravity. Positive value ascends, negative value descends.
// @tparam[opt=0] float rotVel Rotational velocity in degrees.
// @tparam[opt=Color(255&#44; 255&#44; 255)] Color startColor Color at start of life.
// @tparam[opt=Color(255&#44; 255&#44; 255)] Color endColor Color at end of life. This will finish long before the end of the particle's life due to internal math.
// @tparam[opt=TEN.Effects.BlendID.ALPHA_BLEND] Effects.BlendID blendMode Render blend mode.
// @tparam[opt=10] float startSize Size at start of life.
// @tparam[opt=0] float endSize Size at end of life.
// @tparam[opt=2] float life Lifespan in seconds.
// @tparam[opt=false] bool damage Harm the player on collision.
// @tparam[opt=false] bool poison Poison the player on collision.
// @tparam[opt=Objects.ObjID.DEFAULT_SPRITES] Objects.ObjID.SpriteConstants spriteSeqID Sprite sequence slot ID.
// @tparam[opt=random] float startRot Rotation at start of life.
// @usage
// EmitParticle(
// pos,
@ -223,7 +223,7 @@ namespace TEN::Scripting::Effects
/// Emit a particle with extensive configuration options, including sprite sequence animation, lights, sounds, and damage effects.
// @function EmitAdvancedParticle
// @tparam ParticleData ParticleData Table containing particle data.
// @tparam ParticleData particleData Table containing particle data.
// @usage
// local particle =
// {
@ -261,31 +261,31 @@ namespace TEN::Scripting::Effects
// @table ParticleData
// @tfield Vec3 pos World position.
// @tfield Vec3 vel Directional velocity in world units per second.
// @tfield[opt] Objects.ObjID.SpriteConstants spriteSeqID Sprite sequence slot ID. __default: Objects.ObjID.DEFAULT_SPRITES__
// @tfield[opt] int spriteID Sprite ID in the sprite sequence slot. __default: 0__
// @tfield[opt] float life Lifespan in seconds. __default: 2__
// @tfield[opt] float maxYVel Maximum vertical velocity in world units per second. __default: 0__
// @tfield[opt] float gravity Effect of gravity in world units per second. Positive value ascend, negative value descend. __default: 0__
// @tfield[opt] float friction Friction affecting velocity over time in world units per second. __default: 0__
// @tfield[opt] float startRot Rotation at start of life. __default: random__
// @tfield[opt] float rotVel Rotational velocity in degrees per second. __default: 0__
// @tfield[opt] float startSize Size at start of life. __default: 10__
// @tfield[opt] float endSize Size at end of life. __default: 0__
// @tfield[opt] Color startColor Color at start of life. __default: Color(255, 255, 255)__
// @tfield[opt] Color endColor Color at end of life. Note that this will finish long before the end of life due to internal math. __default: Color(255, 255, 255)__
// @tfield[opt] Effects.BlendID blendMode Render blend mode. __default: TEN.Effects.BlendID.ALPHA_BLEND__
// @tfield[opt] bool damage Harm the player on collision. __default: false__
// @tfield[opt] bool poison Poison the player on collision. __default: false__
// @tfield[opt] bool burn Burn the player on collision. __default: false__
// @tfield[opt] bool wind Affect position by wind in outside rooms. __default: false__
// @tfield[opt] int damageHit Player damage amount on collision. __default: 2__
// @tfield[opt] bool light Emit a colored light. CAUTION: Recommended only for a single particle. Too many particles with lights can overwhelm the lighting system. __default: false__
// @tfield[opt] int lightRadius Light radius in 1/4 blocks. __default: 0__
// @tfield[opt] int lightFlicker Interval at which the light should flicker. __default: 0__
// @tfield[opt] int soundID Sound ID to play. CAUTION: Recommended only for a single particle. Too many particles with sounds can overwhelm the sound system. __default: none__
// @tfield[opt] bool animated Play animates sprite sequence. __default: false__
// @tfield[opt] Effects.ParticleAnimationType animType Animation type of the sprite sequence. __default: TEN.Effects.ParticleAnimationType.LOOP__
// @tfield[opt] float frameRate Sprite sequence animation framerate. __default: 1__
// @tfield[opt=Objects.ObjID.DEFAULT_SPRITES] Objects.ObjID.SpriteConstants spriteSeqID Sprite sequence slot ID.
// @tfield[opt=0] int spriteID Sprite ID in the sprite sequence slot.
// @tfield[opt=2] float life Lifespan in seconds.
// @tfield[opt=0] float maxYVel Maximum vertical velocity in world units per second.
// @tfield[opt=0] float gravity Effect of gravity in world units per second. Positive value ascend, negative value descend.
// @tfield[opt=0] float friction Friction affecting velocity over time in world units per second.
// @tfield[opt=random] float startRot Rotation at start of life.
// @tfield[opt=0] float rotVel Rotational velocity in degrees per second.
// @tfield[opt=10] float startSize Size at start of life.
// @tfield[opt=0] float endSize Size at end of life.
// @tfield[opt=Color(255&#44; 255&#44; 255)] Color startColor Color at start of life.
// @tfield[opt=Color(255&#44; 255&#44; 255)] Color endColor Color at end of life. Note that this will finish long before the end of life due to internal math.
// @tfield[opt=TEN.Effects.BlendID.ALPHA_BLEND] Effects.BlendID blendMode Render blend mode.
// @tfield[opt=false] bool damage Harm the player on collision.
// @tfield[opt=false] bool poison Poison the player on collision.
// @tfield[opt=false] bool burn Burn the player on collision.
// @tfield[opt=false] bool wind Affect position by wind in outside rooms.
// @tfield[opt=2] int damageHit Player damage amount on collision.
// @tfield[opt=false] bool light Emit a colored light. __Caution__: Recommended only for a single particle. Too many particles with lights can overwhelm the lighting system.
// @tfield[opt=0] int lightRadius Light radius in 1/4 blocks.
// @tfield[opt=0] int lightFlicker Interval at which the light should flicker.
// @tfield[opt] int soundID Sound ID to play. __Caution__: Recommended only for a single particle. Too many particles with sounds can overwhelm the sound system.
// @tfield[opt=false] bool animated Play animates sprite sequence.
// @tfield[opt=TEN.Effects.ParticleAnimationType.LOOP] Effects.ParticleAnimationType animType Animation type of the sprite sequence.
// @tfield[opt=1] float frameRate Sprite sequence animation framerate.
static void EmitAdvancedParticle(const sol::table& table)
{
constexpr auto DEFAULT_START_SIZE = 10.0f;
@ -402,14 +402,14 @@ namespace TEN::Scripting::Effects
/// Emit a shockwave, similar to that seen when a harpy projectile hits something.
// @function EmitShockwave
// @tparam Vec3 pos Origin position
// @tparam int innerRadius (default 0) Initial inner radius of the shockwave circle - 128 will be approx a click, 512 approx a block
// @tparam int outerRadius (default 128) Initial outer radius of the shockwave circle
// @tparam Color color (default Color(255, 255, 255))
// @tparam float lifetime (default 1.0) Lifetime in seconds (max 8.5 because of inner maths weirdness)
// @tparam int speed (default 50) Initial speed of the shockwave's expansion (the shockwave will always slow as it goes)
// @tparam int angle (default 0) Angle about the X axis - a value of 90 will cause the shockwave to be entirely vertical
// @tparam bool hurtsLara (default false) If true, the shockwave will hurt Lara, with the damage being relative to the shockwave's current speed
// @tparam Vec3 pos Origin Position.
// @tparam[opt=0] int innerRadius Initial inner radius of the shockwave circle - 128 will be approx a click, 512 approx a block.
// @tparam[opt=128] int outerRadius Initial outer radius of the shockwave circle.
// @tparam[opt=Color(255&#44; 255&#44; 255)] Color color Color.
// @tparam[opt=1.0] float lifetime Lifetime in seconds (max 8.5 because of inner maths weirdness).
// @tparam[opt=50] int speed Initial speed of the shockwave's expansion (the shockwave will always slow as it goes).
// @tparam[opt=0] int angle Angle about the X axis - a value of 90 will cause the shockwave to be entirely vertical.
// @tparam[opt=false] bool hurtsLara If true, the shockwave will hurt Lara, with the damage being relative to the shockwave's current speed.
static void EmitShockwave(Vec3 pos, TypeOrNil<int> innerRadius, TypeOrNil<int> outerRadius, TypeOrNil<ScriptColor> col,
TypeOrNil<float> lifetime, TypeOrNil<int> speed, TypeOrNil<int> angle, TypeOrNil<bool> hurtPlayer)
{
@ -444,10 +444,10 @@ namespace TEN::Scripting::Effects
// If you want a light that sticks around, you must call this each frame.
// @function EmitLight
// @tparam Vec3 pos position of the light
// @tparam[opt] Color color light color (default Color(255, 255, 255))
// @tparam[opt] int radius measured in "clicks" or 256 world units (default 20)
// @tparam[opt] bool shadows determines whether light should generate dynamic shadows for applicable moveables (default is false)
// @tparam[opt] string name if provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights)
// @tparam[opt=Color(255&#44; 255&#44; 255)] Color color light color.
// @tparam[opt=20] int radius Measured in "clicks" or 256 world units.
// @tparam[opt=false] bool shadows Determines whether light should generate dynamic shadows for applicable moveables.
// @tparam[opt] string name If provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights).
static void EmitLight(Vec3 pos, TypeOrNil<ScriptColor> col, TypeOrNil<int> radius, TypeOrNil<bool> castShadows, TypeOrNil<std::string> name)
{
auto color = ValueOr<ScriptColor>(col, ScriptColor(255, 255, 255));
@ -460,12 +460,12 @@ namespace TEN::Scripting::Effects
// @function EmitSpotLight
// @tparam Vec3 pos position of the light
// @tparam Vec3 dir normal which indicates light direction
// @tparam[opt] Color color (default Color(255, 255, 255))
// @tparam[opt] int radius overall radius at the endpoint of a light cone, measured in "clicks" or 256 world units (default 10)
// @tparam[opt] int falloff radius, at which light starts to fade out, measured in "clicks" (default 5)
// @tparam[opt] int distance distance, at which light cone fades out, measured in "clicks" (default 20)
// @tparam[opt] bool shadows determines whether light should generate dynamic shadows for applicable moveables (default is false)
// @tparam[opt] string name if provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights)
// @tparam[opt=Color(255&#44; 255&#44; 255)] Color color Color.
// @tparam[opt=10] int radius Overall radius at the endpoint of a light cone, measured in "clicks" or 256 world units.
// @tparam[opt=5] int falloff Radius, at which light starts to fade out, measured in "clicks".
// @tparam[opt=20] int distance Distance, at which light cone fades out, measured in "clicks".
// @tparam[opt=false] bool shadows Determines whether light should generate dynamic shadows for applicable moveables.
// @tparam[opt] string name If provided, engine will interpolate this light for high framerate mode (be careful not to use same name for different lights).
static void EmitSpotLight(Vec3 pos, Vec3 dir, TypeOrNil<ScriptColor> col, TypeOrNil<int> radius, TypeOrNil<int> falloff, TypeOrNil<int> distance, TypeOrNil<bool> castShadows, TypeOrNil<std::string> name)
{
auto color = ValueOr<ScriptColor>(col, ScriptColor(255, 255, 255));
@ -478,7 +478,7 @@ namespace TEN::Scripting::Effects
/// Emit blood.
// @function EmitBlood
// @tparam Vec3 pos
// @tparam int count Sprite count. __default: 1__
// @tparam[opt=1] int count Sprite count.
static void EmitBlood(const Vec3& pos, TypeOrNil<int> count)
{
TriggerBlood(pos.x, pos.y, pos.z, -1, ValueOr<int>(count, 1));
@ -487,8 +487,8 @@ namespace TEN::Scripting::Effects
/// Emit an air bubble in a water room.
// @function EmitAirBubble
// @tparam Vec3 pos World position where the effect will be spawned. Must be in a water room.
// @tparam[opt] float size Sprite size. __Default: 32__
// @tparam[opt] float amp Oscillation amplitude. __Default: 32__
// @tparam[opt=32] float size Sprite size.
// @tparam[opt=32] float amp Oscillation amplitude.
static void EmitAirBubble(const Vec3& pos, TypeOrNil<float> size, TypeOrNil<float> amp)
{
constexpr auto DEFAULT_SIZE = 128.0f;
@ -502,8 +502,8 @@ namespace TEN::Scripting::Effects
/// Emit fire for one frame. Will not hurt player. Call this each frame if you want a continuous fire.
// @function EmitFire
// @tparam Vec3 pos
// @tparam float size Fire size. __default: 1__
// @tparam Vec3 pos Position.
// @tparam[opt=1] float size Fire size.
static void EmitFire(const Vec3& pos, TypeOrNil<float> size)
{
AddFire(pos.x, pos.y, pos.z, FindRoomNumber(pos.ToVector3i()), ValueOr<float>(size, 1));
@ -512,8 +512,8 @@ namespace TEN::Scripting::Effects
/// Make an explosion. Does not hurt Lara
// @function MakeExplosion
// @tparam Vec3 pos
// @tparam float size (default 512.0) this will not be the size of the sprites, but rather the distance between the origin and any additional sprites
// @tparam bool shockwave (default false) if true, create a very faint white shockwave which will not hurt Lara
// @tparam[opt=512] float size This will not be the size of the sprites, but rather the distance between the origin and any additional sprites.
// @tparam[opt=false] bool shockwave If true, create a very faint white shockwave which will not hurt Lara.
static void MakeExplosion(Vec3 pos, TypeOrNil<float> size, TypeOrNil<bool> shockwave)
{
TriggerExplosion(Vector3(pos.x, pos.y, pos.z), ValueOr<float>(size, 512.0f), true, false, ValueOr<bool>(shockwave, false), FindRoomNumber(Vector3i(pos.x, pos.y, pos.z)));
@ -521,7 +521,7 @@ namespace TEN::Scripting::Effects
/// Make an earthquake
// @function MakeEarthquake
// @tparam int strength (default 100) How strong should the earthquake be? Increasing this value also increases the lifespan of the earthquake.
// @tparam[opt=100] int strength How strong should the earthquake be? Increasing this value also increases the lifespan of the earthquake.
static void Earthquake(TypeOrNil<int> strength)
{
int str = ValueOr<int>(strength, 100);
@ -540,20 +540,20 @@ namespace TEN::Scripting::Effects
/// Emit an extending streamer effect.
// @function EmitStreamer
// @tparam Moveable mov Moveable object with which to associate the effect.
// @tparam int[opt] tag Numeric tag with which to associate the effect on the moveable. __Default: 0__
// @tparam int tag Numeric tag with which to associate the effect on the moveable.
// @tparam Vec3 pos World position.
// @tparam Vec3 dir Direction vector of movement velocity.
// @tparam[opt] float rot Start rotation in degrees. __Default: 0__
// @tparam[opt] Color startColor Color at the start of life. __Default: Color(255, 255, 255, 255))__
// @tparam[opt] Color endColor Color at the end of life. __Default: Color(0, 0, 0, 0))__
// @tparam[opt] float width Width in world units. __Default: 0__
// @tparam[opt] float life Lifetime in seconds. __Default: 1__
// @tparam[opt] float vel Movement velocity in world units per second. __Default: 0__
// @tparam[opt] float expRate Width expansion rate in world units per second. __Default: 0__
// @tparam[opt] float rotRate Rotation rate in degrees per second. __Default: 0__
// @tparam[opt] Effects.StreamerFeatherMode edgeFeatherMode Edge feather mode. __Default: Effects.StreamerFeatherMode.NONE__
// @tparam[opt] Effects.StreamerFeatherMode lengthFeatherMode Length feather mode. __UNIMPLEMENTED, currently will always leave a fading tail__
// @tparam[opt] Effects.BlendID blendID Renderer blend ID. __Default: Effects.BlendID.ALPHA_BLEND__
// @tparam[opt=0] float rot Start rotation in degrees.
// @tparam[opt=Color(255&#44; 255&#44; 255)] Color startColor Color at the start of life.
// @tparam[opt=Color(0&#44; 0&#44; 0)] Color endColor Color at the end of life.
// @tparam[opt=0] float width Width in world units.
// @tparam[opt=1] float life Lifetime in seconds.
// @tparam[opt=0] float vel Movement velocity in world units per second.
// @tparam[opt=0] float expRate Width expansion rate in world units per second.
// @tparam[opt=0] float rotRate Rotation rate in degrees per second.
// @tparam[opt=Effects.StreamerFeatherMode.NONE] Effects.StreamerFeatherMode edgeFeatherMode Edge feather mode.
// @tparam[opt=Effects.StreamerFeatherMode.LEFT] Effects.StreamerFeatherMode lengthFeatherMode Length feather mode. _Not yet implemented._
// @tparam[opt=Effects.BlendID.ALPHA_BLEND] Effects.BlendID blendID Renderer blend ID.
static void EmitStreamer(const Moveable& mov, TypeOrNil<int> tag, const Vec3& pos, const Vec3& dir, TypeOrNil<float> rot, TypeOrNil<ScriptColor> startColor, TypeOrNil<ScriptColor> endColor,
TypeOrNil<float> width, TypeOrNil<float> life, TypeOrNil<float> vel, TypeOrNil<float> expRate, TypeOrNil<float> rotRate,
TypeOrNil<StreamerFeatherMode> edgeFeatherMode, TypeOrNil<StreamerFeatherMode> lengthFeatherMode, TypeOrNil<BlendMode> blendID)

View file

@ -14,14 +14,14 @@ namespace TEN::Scripting
//
// The following constants are inside Flow.ErrorMode: <br>
//
// - `TERMINATE` - print to the log file and return to the title level when any script error is hit.
// This is the one you will want to go for if you want to know IMMEDIATELY if something has gone wrong.
// - `TERMINATE` - Print to the log file and return to the title level when any script error is hit.
// This is the one you will want to go for if you want to know _immediately_ if something has gone wrong.
//
// - `WARN` - print to the log file and continue running the application when a recoverable script error is hit.
// - `WARN` - Print to the log file and continue running the application when a recoverable script error is hit.
// Choose this one if booting to the title level is too much for you.
//
// - `SILENT` - do nothing when a recoverable script error is hit.
// Think __very__ carefully before using this setting. These error modes are here to help you to keep your scripts
// - `SILENT` - Do nothing when a recoverable script error is hit.
// Think _very_ carefully before using this setting. These error modes are here to help you to keep your scripts
// working properly, but if you opt to ignore errors, you won't be alerted if you've misused a function or passed
// an invalid argument.
//

View file

@ -56,54 +56,50 @@ ambient tracks.
/***
Add a level to the Flow.
@function AddLevel
@tparam Flow.Level level a level object
@tparam Flow.Level level A level object.
*/
tableFlow.set_function(ScriptReserved_AddLevel, &FlowHandler::AddLevel, this);
/*** Image to show when loading the game.
Must be a .jpg or .png image.
/*** Image to show when loading the game. Must be a .jpg or .png image.
@function SetIntroImagePath
@tparam string path the path to the image, relative to the TombEngine exe
@tparam string path The path to the image, relative to the TombEngine executable.
*/
tableFlow.set_function(ScriptReserved_SetIntroImagePath, &FlowHandler::SetIntroImagePath, this);
/*** Video to show when loading the game.
Must be a common video format, such as .mp4, .mkv or .avi.
/*** Video to show when loading the game. Must be a common video format, such as mp4, mkv, mov or avi.
@function SetIntroVideoPath
@tparam string path the path to the video, relative to the TombEngine exe
*/
tableFlow.set_function(ScriptReserved_SetIntroVideoPath, &FlowHandler::SetIntroVideoPath, this);
/*** Image to show in the background of the title screen.
Must be a .jpg or .png image.
__(not yet implemented)__
/*** Image to show in the background of the title screen. Must be a .jpg or .png image. _Not yet implemented._
@function SetTitleScreenImagePath
@tparam string path the path to the image, relative to the TombEngine exe
@tparam string path The path to the image, relative to the TombEngine executable.
*/
tableFlow.set_function(ScriptReserved_SetTitleScreenImagePath, &FlowHandler::SetTitleScreenImagePath, this);
/*** Enable or disable Lara drawing in title flyby.
Must be true or false
@function EnableLaraInTitle
@tparam bool enabled true or false
@tparam bool enabled True or false.
*/
tableFlow.set_function(ScriptReserved_EnableLaraInTitle, &FlowHandler::EnableLaraInTitle, this);
/*** Enable or disable level selection in title flyby.
Must be true or false
@function EnableLevelSelect
@tparam bool enabled true or false
@tparam bool enabled True or false.
*/
tableFlow.set_function(ScriptReserved_EnableLevelSelect, &FlowHandler::EnableLevelSelect, this);
/*** Enable or disable Home Level entry in the main menu.
@function EnableHomeLevel()
@function EnableHomeLevel
@tparam bool enabled True or false.
*/
tableFlow.set_function(ScriptReserved_EnableHomeLevel, &FlowHandler::EnableHomeLevel, this);
/*** Enable or disable saving and loading of savegames.
@function EnableLoadSave()
@function EnableLoadSave
@tparam bool enabled True or false.
*/
tableFlow.set_function(ScriptReserved_EnableLoadSave, &FlowHandler::EnableLoadSave, this);
@ -113,7 +109,7 @@ Must be true or false
*/
/*** Enable or disable the fly cheat.
@function EnableFlyCheat()
@function EnableFlyCheat
@tparam bool enabled True or false.
*/
tableFlow.set_function(ScriptReserved_EnableFlyCheat, &FlowHandler::EnableFlyCheat, this);
@ -121,29 +117,29 @@ Must be true or false
/*** Enable or disable point texture filter.
Must be true or false
@function EnablePointFilter
@tparam bool enabled true or false
@tparam bool enabled True or false.
*/
tableFlow.set_function(ScriptReserved_EnablePointFilter, &FlowHandler::EnablePointFilter, this);
/*** Enable or disable mass pickup.
Must be true or false
@function EnableMassPickup
@tparam bool enabled true or false
@tparam bool enabled True or false.
*/
tableFlow.set_function(ScriptReserved_EnableMassPickup, &FlowHandler::EnableMassPickup, this);
/*** Returns the level by index.
Indices depend on the order in which AddLevel was called; the first added will
have an ID of 0, the second an ID of 1, and so on.
have an index of 0, the second an index of 1, and so on.
@function GetLevel
@tparam int index of the level
@treturn Flow.Level the level indicated by the id
@tparam int index Index of the level.
@treturn Flow.Level The level indicated by the index.
*/
tableFlow.set_function(ScriptReserved_GetLevel, &FlowHandler::GetLevel, this);
/*** Returns the level that the game control is running in that moment.
@function GetCurrentLevel
@treturn Flow.Level the current level
@treturn Flow.Level The current level.
*/
tableFlow.set_function(ScriptReserved_GetCurrentLevel, &FlowHandler::GetCurrentLevel, this);
@ -152,38 +148,38 @@ If level index is not provided or is zero, jumps to next level. If level index i
level count, jumps to title. If LARA\_START\_POS objects are present in level, player will be
teleported to such object with OCB similar to provided second argument.
@function EndLevel
@int[opt] index level index (default 0)
@int[opt] startPos player start position (default 0)
@int[opt=0] index Level index.
@int[opt=0] startPos Player start position in the next level. Should correspond to OCB of `Objects.ObjID.LARA_START_POS` object in the next level.
*/
tableFlow.set_function(ScriptReserved_EndLevel, &FlowHandler::EndLevel, this);
/***
Get game or level statistics. For reference about statistics class, see @{Flow.Statistics}.
@function GetStatistics
@tparam bool game if true, returns overall game statistics, otherwise returns current level statistics (default: false)
@treturn Flow.Statistics statistics structure representing game or level statistics
@tparam[opt=false] bool game If true, returns overall game statistics, otherwise returns current level statistics.
@treturn Flow.Statistics Statistics structure representing game or level statistics.
*/
tableFlow.set_function(ScriptReserved_GetStatistics, &FlowHandler::GetStatistics, this);
/***
Set game or level statistics. For reference about statistics class, see @{Flow.Statistics}.
@function SetStatistics
@tparam Flow.Statistics statistics statistic object to set
@tparam bool game if true, sets overall game statistics, otherwise sets current level statistics (default: false)
@tparam Flow.Statistics statistics Statistic object to set.
@tparam[opt=false] bool game If true, sets overall game statistics, otherwise sets current level statistics.
*/
tableFlow.set_function(ScriptReserved_SetStatistics, &FlowHandler::SetStatistics, this);
/***
Get current game status, such as normal game loop, exiting to title, etc.
@function GetGameStatus
@treturn Flow.GameStatus the current game status
@treturn Flow.GameStatus The current game status.
*/
tableFlow.set_function(ScriptReserved_GetGameStatus, &FlowHandler::GetGameStatus, this);
/***
Get current freeze mode, such as none, full, spectator or player.
@function GetFreezeMode
@treturn Flow.FreezeMode the current freeze mode
@treturn Flow.FreezeMode The current freeze mode.
*/
tableFlow.set_function(ScriptReserved_GetFreezeMode, &FlowHandler::GetFreezeMode, this);
@ -192,7 +188,7 @@ Set current freeze mode, such as none, full, spectator or player.
Freeze mode specifies whether game is in normal mode or paused in a particular way to allow
custom menu creation, photo mode or time freeze.
@function SetFreezeMode
@tparam Flow.FreezeMode freezeMode new freeze mode to set.
@tparam Flow.FreezeMode freezeMode New freeze mode to set.
*/
tableFlow.set_function(ScriptReserved_SetFreezeMode, &FlowHandler::SetFreezeMode, this);
@ -235,7 +231,7 @@ Returns the player's current per-game secret count.
/***
Sets the player's current per-game secret count.
@function SetSecretCount
@tparam int count new secret count.
@tparam int count New secret count.
*/
tableFlow.set_function(ScriptReserved_SetSecretCount, &FlowHandler::SetSecretCount, this);
@ -243,7 +239,7 @@ Sets the player's current per-game secret count.
Adds one secret to current level secret count and also plays secret music track.
The index argument corresponds to the secret's unique ID, the same that would go in a secret trigger's Param.
@function AddSecret
@tparam int index an index of current level's secret (must be from 0 to 31).
@tparam int index An index of current level's secret (must be from 0 to 31).
*/
tableFlow.set_function(ScriptReserved_AddSecret, &FlowHandler::AddSecret, this);
@ -277,45 +273,46 @@ Must be an integer value (0 means no secrets).
These functions are called in settings.lua, a file which holds global settings, such as system settings, flare color or animation movesets.
@section settingslua
*/
/*** Set provided settings table to an engine.
@function SetSettings
@tparam Flow.Settings settings a settings table
@tparam Flow.Settings settings A settings table.
*/
tableFlow.set_function(ScriptReserved_SetSettings, &FlowHandler::SetSettings, this);
/*** Get settings table from an engine.
@function GetSettings
@treturn Flow.Settings current settings table
@treturn Flow.Settings Current settings table.
*/
tableFlow.set_function(ScriptReserved_GetSettings, &FlowHandler::GetSettings, this);
/*** strings.lua.
These functions used in strings.lua, which is generated by TombIDE.
You will not need to call them manually.
These functions used in strings.lua, which is generated by TombIDE. You will not need to call them manually.
@section stringslua
*/
/*** Set string variable keys and their translations.
@function SetStrings
@tparam tab table array-style table with strings
@tparam table table Array-style table with strings.
*/
tableFlow.set_function(ScriptReserved_SetStrings, &FlowHandler::SetStrings, this);
/*** Get translated string.
@function GetString
@tparam key string key for translated string
@tparam string key Key for translated string.
*/
tableFlow.set_function(ScriptReserved_GetString, &FlowHandler::GetString, this);
/*** Check if translated string is present.
@function IsStringPresent
@tparam key string key for translated string
@tparam string key Key for translated string.
*/
tableFlow.set_function(ScriptReserved_IsStringPresent, &FlowHandler::IsStringPresent, this);
/*** Set language names for translations.
Specify which translations in the strings table correspond to which languages.
@function SetLanguageNames
@tparam tab table array-style table with language names
@tparam table table Array-style table with language names.
*/
tableFlow.set_function(ScriptReserved_SetLanguageNames, &FlowHandler::SetLanguageNames, this);

View file

@ -37,8 +37,8 @@ void Fog::Register(sol::table& parent)
/***
@tparam Color color RGB color
@tparam int min Distance at which fog starts (in sectors)
@tparam int max Distance at which fog reaches the maximum strength (in sectors)
@tparam int min Distance at which fog starts (in sectors).
@tparam int max Distance at which fog reaches the maximum strength (in sectors).
@treturn Fog A fog object.
@function Fog
*/

View file

@ -11,15 +11,14 @@
/*** Create an InventoryItem.
@function InventoryItem
@tparam string nameKey key for the item's (localised) name.<br />
Corresponds to an entry in strings.lua.
@tparam string nameKey key for the item's (localised) name. Corresponds to an entry in strings.lua.
@tparam Objects.ObjID objectID object ID of the inventory object to change
@tparam float yOffset y-axis offset (positive values move the item down).<br />
A value of about 100 will cause the item to display directly below its usual position.
@tparam float scale item size (1 being standard size).<br />
A value of 0.5 will cause the item to render at half the size,
and a value of 2 will cause the item to render at twice the size.
@tparam Rotation rot rotation around x, y, and z axes
@tparam Rotation rot rotation around x, y, and z axes.
@tparam RotationAxis axis Axis to rotate around when the item is observed at in the inventory.<br />
Note that this is entirely separate from the `rot` field described above.
Must one of the following:
@ -27,7 +26,7 @@ Must one of the following:
Y
Z
e.g. `myItem.rotAxisWhenCurrent = RotationAxis.X`
@tparam int meshBits __Not currently implemented__ (will have no effect regardless of what you set it to)
@tparam int meshBits _Not currently implemented_ (will have no effect regardless of what you set it to).
@tparam ItemAction action is this usable, equippable, combineable or examinable?<br/>
Must be one of:
EQUIP
@ -35,7 +34,7 @@ Must be one of:
COMBINE
EXAMINE
e.g. `myItem.action = ItemAction.EXAMINE`
@treturn InventoryItem an InventoryItem
@treturn InventoryItem an InventoryItem.
*/
InventoryItem::InventoryItem(const std::string& name, GAME_OBJECT_ID objectID, float yOffset, float scale, const Rotation& rot, RotationFlags rotFlags, int meshBits, ItemOptions action) :
Name(name),

View file

@ -24,13 +24,12 @@ void Level::Register(sol::table& parent)
sol::constructors<Level()>(),
sol::call_constructor, sol::constructors<Level()>(),
/// (string) string key for the level's (localised) name.
// Corresponds to an entry in strings.lua.
/// (string) String key for the level's name. Corresponds to an entry in strings.lua.
//@mem nameKey
"nameKey", &Level::NameStringKey,
/// (string) Level-specific Lua script file.
// Path of the Lua file holding the level's logic script, relative to the location of the tombengine executable
// Path of the Lua file holding the level's logic script, relative to the location of the Tomb Engine executable.
//@mem scriptFile
"scriptFile", &Level::ScriptFileName,
@ -40,11 +39,11 @@ void Level::Register(sol::table& parent)
"levelFile", &Level::FileName,
/// (string) Load screen image.
// Path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable
// Path of the level's load screen file (.png or .jpg), relative to the location of the Tomb Engine executable.
//@mem loadScreenFile
"loadScreenFile", &Level::LoadScreenFileName,
/// (string) initial ambient sound track to play.
/// (string) Initial ambient sound track to play.
// This is the filename of the track __without__ the .wav extension.
//@mem ambientTrack
"ambientTrack", &Level::AmbientTrack,
@ -57,12 +56,12 @@ void Level::Register(sol::table& parent)
//@mem layer2
"layer2", &Level::Layer2,
/// (@{Flow.Horizon}) First horizon layer.
/// (@{Flow.Horizon}) Primary horizon object.
//@mem horizon1
"horizon1", &Level::Horizon1,
"horizon", sol::property(&Level::GetHorizon1Enabled, &Level::SetHorizon1Enabled), // Compatibility.
/// (@{Flow.Horizon}) Second horizon layer.
/// (@{Flow.Horizon}) Secondary horizon object.
//@mem horizon2
"horizon2", &Level::Horizon2,
@ -80,7 +79,7 @@ void Level::Register(sol::table& parent)
"fog", &Level::Fog,
/// (bool) Enable flickering lightning in the sky.
// Equivalent to classic TRLE's LIGHTNING setting. As in the TRC Ireland levels.
// Equivalent to classic TRLE's lightning setting, as in the TRC Ireland levels or TR4 Cairo levels.
//@mem storm
"storm", &Level::Storm,
@ -94,19 +93,10 @@ void Level::Register(sol::table& parent)
//@mem weatherStrength
"weatherStrength", &Level::WeatherStrength,
/*** (LaraType) Must be one of the LaraType values.
These are:
/*** (LaraType) Appearance of Lara. Must be either `LaraType.Normal` or `LaraType.Young`.
E.g. `myLevel.laraType = LaraType.Young` will make Lara appear as young (with two ponytails rendered).
This setting does not affect ability to use weapons or flares.
Normal
Young
Bunhead
Catsuit
Divesuit
Invisible
e.g. `myLevel.laraType = LaraType.Divesuit`
__Not yet fully implemented.__ Only types `Normal` and `Young` are guaranteed to work.
@mem laraType*/
"laraType", &Level::Type,

View file

@ -73,35 +73,35 @@ namespace TEN::Scripting
sol::meta_function::new_index, NewIndexErrorMaker(AnimSettings, ScriptReserved_AnimSettings),
/// Extended crawl moveset.
// @tfield bool crawlExtended when enabled, player will be able to traverse across one-click steps in crawlspaces.
// @tfield bool crawlExtended When enabled, player will be able to traverse across one-click steps in crawlspaces.
"crawlExtended", &AnimSettings::CrawlExtended,
/// Crouch roll.
// @tfield bool crouchRoll when enabled, player can perform crawlspace roll by pressing sprint key.
// @tfield bool crouchRoll When enabled, player can perform crawlspace roll by pressing sprint key.
"crouchRoll", &AnimSettings::CrouchRoll,
/// Crawlspace dive.
// @tfield bool crawlspaceSwandive when enabled, player will be able to swandive into crawlspaces.
// @tfield bool crawlspaceSwandive When enabled, player will be able to swandive into crawlspaces.
"crawlspaceSwandive", &AnimSettings::CrawlspaceDive,
// Overhang climbing.
// @tfield bool overhangClimb enables overhang climbing feature. Currently does not work.
// @tfield bool overhangClimb Enables overhang climbing feature. Currently does not work.
"overhangClimb", &AnimSettings::OverhangClimb,
// Extended slide mechanics.
// @tfield bool slideExtended if enabled, player will be able to change slide direction with controls. Currently does not work.
// @tfield bool slideExtended If enabled, player will be able to change slide direction with controls. Currently does not work.
"slideExtended", &AnimSettings::SlideExtended,
/// Sprint jump.
// @tfield bool sprintJump if enabled, player will be able to perform extremely long jump when sprinting.
// @tfield bool sprintJump If enabled, player will be able to perform extremely long jump when sprinting.
"sprintJump", &AnimSettings::SprintJump,
/// Ledge jumps.
// @tfield bool ledgeJumps if this setting is enabled, player will be able to jump upwards while hanging on the ledge.
// @tfield bool ledgeJumps If this setting is enabled, player will be able to jump upwards while hanging on the ledge.
"ledgeJumps", &AnimSettings::LedgeJumps,
/// Pose timeout.
// @tfield int poseTimeout if this setting is larger than 0, idle standing pose animation will be performed after given timeout (in seconds).
// @tfield int poseTimeout If this setting is larger than 0, idle standing pose animation will be performed after given timeout (in seconds).
"poseTimeout", &AnimSettings::PoseTimeout);
}
@ -116,15 +116,15 @@ namespace TEN::Scripting
sol::meta_function::new_index, NewIndexErrorMaker(CameraSettings, ScriptReserved_CameraSettings),
/// Determines highlight color in binocular mode.
// @tfield Color binocularLightColor color of highlight, when player presses action. Zero color means there will be no highlight.
// @tfield Color binocularLightColor Color of highlight, when player presses action. Zero color means there will be no highlight.
"binocularLightColor", &CameraSettings::BinocularLightColor,
/// Determines highlight color in lasersight mode.
// @tfield Color lasersightLightColor lasersight highlight color. Zero color means there will be no highlight.
// @tfield Color lasersightLightColor Lasersight highlight color. Zero color means there will be no highlight.
"lasersightLightColor", &CameraSettings::LasersightLightColor,
/// Specify whether camera can collide with objects.
// @tfield bool objectCollision when enabled, camera will collide with moveables and statics. Disable for TR4-like camera behaviour.
// @tfield bool objectCollision When enabled, camera will collide with moveables and statics. Disable for TR4-like camera behaviour.
"objectCollision", &CameraSettings::ObjectCollision);
}
@ -139,39 +139,39 @@ namespace TEN::Scripting
sol::meta_function::new_index, NewIndexErrorMaker(FlareSettings, ScriptReserved_FlareSettings),
/// Flare color.
// @tfield Color color flare color. Used for sparks and lensflare coloring as well.
// @tfield Color color Flare color. Used for sparks and lensflare coloring as well.
"color", &FlareSettings::Color,
/// Muzzle offset.
// @tfield Vec3 offset a relative muzzle offset where light and particle effects originate from.
// @tfield Vec3 offset A relative muzzle offset where light and particle effects originate from.
"offset", &FlareSettings::Offset,
/// Light range.
// @tfield int range flare light radius or range. Represented in "clicks" equal to 256 world units.
// @tfield int range Flare light radius or range. Represented in "clicks" equal to 256 world units.
"range", &FlareSettings::Range,
/// Burn timeout.
// @tfield int timeout flare burn timeout. Flare will stop working after given timeout (specified in seconds).
// @tfield int timeout Flare burn timeout. Flare will stop working after given timeout (specified in seconds).
"timeout", &FlareSettings::Timeout,
/// Default flare pickup count.
// @tfield int pickupCount specifies amount of flares that you get when you pick up a box of flares.
// @tfield int pickupCount Specifies amount of flares that you get when you pick up a box of flares.
"pickupCount", &FlareSettings::PickupCount,
/// Lens flare brightness.
// @tfield float lensflareBrightness brightness multiplier. Specifies how bright lens flare is in relation to light (on a range from 0 to 1).
// @tfield float lensflareBrightness Brightness multiplier. Specifies how bright lens flare is in relation to light (on a range from 0 to 1).
"lensflareBrightness", &FlareSettings::LensflareBrightness,
/// Toggle spark effect.
// @tfield bool sparks spark effect. Determines whether flare generates sparks when burning.
// @tfield bool sparks Spark effect. Determines whether flare generates sparks when burning.
"sparks", &FlareSettings::Sparks,
/// Toggle smoke effect.
// @tfield bool smoke smoke effect. Determines whether flare generates smoke when burning.
// @tfield bool smoke Smoke effect. Determines whether flare generates smoke when burning.
"smoke", &FlareSettings::Smoke,
/// Toggle flicker effect.
// @tfield bool flicker light and lensflare flickering. When turned off, flare light will be constant.
// @tfield bool flicker Light and lensflare flickering. When turned off, flare light will be constant.
"flicker", &FlareSettings::Flicker);
}
@ -188,15 +188,15 @@ namespace TEN::Scripting
sol::meta_function::new_index, NewIndexErrorMaker(HairSettings, ScriptReserved_HairSettings),
/// Root mesh to which hair object will attach to.
// @tfield int mesh index of a root mesh to which hair will attach. Root mesh may be different for each hair object.
// @tfield int mesh Index of a root mesh to which hair will attach. Root mesh may be different for each hair object.
"rootMesh", &HairSettings::RootMesh,
/// Relative braid offset to a headmesh.
// @tfield Vec3 offset specifies how braid is positioned in relation to a headmesh.
// @tfield Vec3 offset Specifies how braid is positioned in relation to a headmesh.
"offset", &HairSettings::Offset,
/// Braid connection indices.
// @tfield table indices a list of headmesh's vertex connection indices. Each index corresponds to nearest braid rootmesh vertex. Amount of indices is unlimited.
// @tfield table indices A list of headmesh's vertex connection indices. Each index corresponds to nearest braid rootmesh vertex. Amount of indices is unlimited.
"indices", &HairSettings::Indices);
}
@ -211,19 +211,19 @@ namespace TEN::Scripting
sol::meta_function::new_index, NewIndexErrorMaker(HudSettings, ScriptReserved_HudSettings),
/// Toggle in-game status bars visibility.
// @tfield bool statusBars if disabled, all status bars (health, air, stamina) will be hidden.
// @tfield bool statusBars If disabled, all status bars (health, air, stamina) will be hidden.
"statusBars", &HudSettings::StatusBars,
/// Toggle loading bar visibility.
// @tfield bool loadingBar if disabled, loading bar will be invisible in game.
// @tfield bool loadingBar If disabled, loading bar will be invisible in game.
"loadingBar", &HudSettings::LoadingBar,
/// Toggle speedometer visibility.
// @tfield bool speedometer if disabled, speedometer will be invisible in game.
// @tfield bool speedometer If disabled, speedometer will be invisible in game.
"speedometer", &HudSettings::Speedometer,
/// Toggle pickup notifier visibility.
// @tfield bool pickupNotifier if disabled, pickup notifier will be invisible in game.
// @tfield bool pickupNotifier If disabled, pickup notifier will be invisible in game.
"pickupNotifier", &HudSettings::PickupNotifier);
}
@ -238,11 +238,11 @@ namespace TEN::Scripting
sol::meta_function::new_index, NewIndexErrorMaker(PhysicsSettings, ScriptReserved_PhysicsSettings),
/// Global world gravity.
// @tfield float gravity specifies global gravity. Mostly affects Lara and several other objects.
// @tfield float gravity Specifies global gravity. Mostly affects Lara and several other objects.
"gravity", &PhysicsSettings::Gravity,
/// Swim velocity.
// @tfield float swimVelocity specifies swim velocity for Lara. Affects both surface and underwater.
// @tfield float swimVelocity Specifies swim velocity for Lara. Affects both surface and underwater.
"swimVelocity", &PhysicsSettings::SwimVelocity);
}
@ -258,31 +258,31 @@ namespace TEN::Scripting
sol::meta_function::new_index, NewIndexErrorMaker(WeaponSettings, ScriptReserved_WeaponSettings),
/// Shooting accuracy.
// @tfield float accuracy determines accuracy range in angles (smaller angles mean higher accuracy). Applicable only for firearms.
// @tfield float accuracy Determines accuracy range in angles (smaller angles mean higher accuracy). Applicable only for firearms.
"accuracy", &WeaponSettings::Accuracy,
/// Targeting distance.
// @tfield float targetingDistance specifies maximum targeting distance in world units (1 block = 1024 world units) for a given weapon.
// @tfield float targetingDistance Specifies maximum targeting distance in world units (1 block = 1024 world units) for a given weapon.
"targetingDistance", &WeaponSettings::Distance,
/// Shooting interval.
// @tfield float interval specifies an interval (in frames), after which Lara is able to shoot again. Not applicable for backholster weapons.
// @tfield float interval Specifies an interval (in frames), after which Lara is able to shoot again. Not applicable for backholster weapons.
"interval", &WeaponSettings::Interval,
/// Damage.
// @tfield int damage amount of hit points taken for every hit.
// @tfield int damage Amount of hit points taken for every hit.
"damage", &WeaponSettings::Damage,
/// Alternate damage.
// @tfield int alternateDamage for Revolver and HK, specifies damage in lasersight mode. For crossbow, specifies damage for explosive ammo.
// @tfield int alternateDamage For Revolver and HK, specifies damage in lasersight mode. For crossbow, specifies damage for explosive ammo.
"alternateDamage", &WeaponSettings::AlternateDamage,
/// Water level.
// @tfield int waterLevel specifies water depth, at which Lara will put weapons back into holsters, indicating it's not possible to use it in water.
// @tfield int waterLevel Specifies water depth, at which Lara will put weapons back into holsters, indicating it's not possible to use it in water.
"waterLevel", &WeaponSettings::WaterLevel,
/// Default ammo pickup count.
// @tfield int pickupCount amount of ammo which is given with every ammo pickup for this weapon.
// @tfield int pickupCount Amount of ammo which is given with every ammo pickup for this weapon.
"pickupCount", &WeaponSettings::PickupCount,
/// Gunflash color.
@ -302,7 +302,7 @@ namespace TEN::Scripting
"smoke", &WeaponSettings::Smoke,
/// Gun shell.
// @tfield bool shell if set to true, indicates that weapon emits gun shell. Applicable only for firearms.
// @tfield bool shell If set to true, indicates that weapon emits gun shell. Applicable only for firearms.
"shell", &WeaponSettings::Shell,
/// Display muzzle flash.
@ -333,20 +333,20 @@ namespace TEN::Scripting
sol::meta_function::new_index, NewIndexErrorMaker(SystemSettings, ScriptReserved_SystemSettings),
/// How should the application respond to script errors?
// @tfield Flow.ErrorMode errorMode error mode to use.
// @tfield Flow.ErrorMode errorMode Error mode to use.
"errorMode", &SystemSettings::ErrorMode,
/// Use multithreading in certain calculations. <br>
// When set to `true`, some performance-critical calculations will be performed in parallel, which can give
// a significant performance boost. Don't disable unless you have problems with launching or using TombEngine.
// @tfield bool multithreaded determines whether to use multithreading or not.
// @tfield bool multithreaded Determines whether to use multithreading or not.
"multithreaded", &SystemSettings::Multithreaded,
/// Can the game utilize the fast reload feature? <br>
// When set to `true`, the game will attempt to perform fast savegame reloading if current level is the same as
// the level loaded from the savegame. It will not work if the level timestamp or checksum has changed
// (i.e. level was updated). If set to `false`, this functionality is turned off.
// @tfield bool fastReload toggle fast reload on or off.
// @tfield bool fastReload Toggles fast reload on or off.
"fastReload", &SystemSettings::FastReload);
}
}

View file

@ -19,11 +19,11 @@ void SkyLayer::Register(sol::table & parent)
ctors(),
sol::call_constructor, ctors(),
/// (@{Color}) RGB sky color
/// (@{Color}) RGB sky color.
//@mem color
"color", sol::property(&SkyLayer::GetColor, &SkyLayer::SetColor),
/*** (int) cloud speed.
/*** (int) Cloud speed.
Values can be between [-32768, 32767], with positive numbers resulting in a sky that scrolls from
west to east, and negative numbers resulting in one that travels east to west.
@ -38,8 +38,8 @@ void SkyLayer::Register(sol::table & parent)
}
/***
@tparam Color color RGB color
@tparam int speed cloud speed
@tparam Color color RGB color.
@tparam int speed Cloud speed.
@treturn SkyLayer A SkyLayer object.
@function SkyLayer
*/

View file

@ -66,7 +66,7 @@ namespace TEN::Scripting
// @tparam int meteorCount Meteor count. __Max: 100__
// @tparam int meteorSpawnDensity Meteor spawn density.
// @tparam int meteorVel Meteor velocity.
// @treturn StarField A new Starfield object.
// @treturn Starfield A new Starfield object.
Starfield::Starfield(int starCount, int meteorCount, int meteorSpawnDensity, float meteorVel)
{
if (starCount < 0 || starCount > STAR_COUNT_MAX)

View file

@ -21,47 +21,47 @@ namespace TEN::Scripting
sol::meta_function::new_index, NewIndexErrorMaker(Statistics, ScriptReserved_Statistics),
/*** Ammo hits.
@tfield int ammoHits amount of successful enemy hits.
@tfield int ammoHits Amount of successful enemy hits.
*/
"ammoHits", &Statistics::AmmoHits,
/*** Ammo used.
@tfield int ammoUsed amount of used ammo.
@tfield int ammoUsed Amount of used ammo.
*/
"ammoUsed", &Statistics::AmmoUsed,
/*** Distance traveled.
@tfield int distanceTraveled amount of traveled distance in world units. One meter is 420 world units.
@tfield int distanceTraveled Amount of traveled distance in world units. One meter is 420 world units.
*/
"distanceTraveled", &Statistics::Distance,
/*** Health packs used.
@tfield int healthPacksUsed amount of used medipacks.
@tfield int healthPacksUsed Amount of used medipacks.
*/
"healthPacksUsed", &Statistics::HealthUsed,
/*** Damage taken.
@tfield int damageTaken overall amount of taken damage.
@tfield int damageTaken overall Amount of taken damage.
*/
"damageTaken", &Statistics::DamageTaken,
/*** Kills.
@tfield int kills amount of killed enemies.
@tfield int kills Amount of killed enemies.
*/
"kills", &Statistics::Kills,
/*** Pickups.
@tfield int pickups amount of picked up items.
@tfield int pickups Amount of picked up items.
*/
"pickups", &Statistics::Pickups,
/*** Secrets.
@tfield int secrets amount of found secrets.
@tfield int secrets Amount of found secrets.
*/
"secrets", &Statistics::Secrets,
/*** Time taken.
@tfield Time timeTaken amount of time passed.
@tfield Time timeTaken Amount of time passed.
*/
"timeTaken", &Statistics::TimeTaken);
}

View file

@ -96,7 +96,7 @@ namespace TEN::Scripting::Input
}
/// Get the display position of the cursor in percent.
// @function GetMouseDisplayPosition()
// @function GetMouseDisplayPosition
// @treturn Vec2 Cursor display position in percent.
static Vec2 GetMouseDisplayPosition()
{

View file

@ -342,7 +342,7 @@ Possible event type values:
@function HandleEvent
@tparam string name Name of the event set to find.
@tparam EventType type Event to execute.
@tparam Objects.Moveable activator Optional activator. Default is the player object.
@tparam[opt=Lara] Objects.Moveable activator Optional activator.
*/
void LogicHandler::HandleEvent(const std::string& name, EventType type, sol::optional<Moveable&> activator)
{
@ -951,7 +951,7 @@ std::unique_ptr<R> GetByName(const std::string& type, const std::string& name, c
@section specialobjects
*/
/*** A @{Objects.Moveable} representing Lara herself.
/*** An @{Objects.Moveable} entry representing Lara herself.
@table Lara
*/
void LogicHandler::ResetVariables()

View file

@ -27,67 +27,65 @@ void AIObject::Register(sol::table& parent)
sol::meta_function::index, IndexError,
sol::meta_function::new_index, NewIndexError,
/// Get the object's position
/// Get the object's position.
// @function AIObject:GetPosition
// @treturn Vec3 a copy of the object's position
// @treturn Vec3 A copy of the object's position.
ScriptReserved_GetPosition, &AIObject::GetPos,
/// Set the object's position
/// Set the object's position.
// @function AIObject:SetPosition
// @tparam Vec3 position the new position of the object
// @tparam Vec3 position The new position of the object.
ScriptReserved_SetPosition, &AIObject::SetPos,
/// Get the object's Y-axis rotation.
// To the best of my knowledge, the rotation of an AIObject has no effect.
// @function AIObject:GetRotationY
// @treturn number the object's Y-axis rotation
// @treturn int The object's Y-axis rotation.
ScriptReserved_GetRotationY, &AIObject::GetYRot,
/// Set the object's Y-axis rotation.
// To the best of my knowledge, the rotation of an AIObject has no effect.
// @function AIObject:SetRotationY
// @tparam number rotation The object's new Y-axis rotation
// @tparam int rotation The object's new Y-axis rotation.
ScriptReserved_SetRotationY, &AIObject::SetYRot,
/// Get the object's unique string identifier
/// Get the object's unique string identifier.
// @function AIObject:GetName
// @treturn string the object's name
// @treturn string The object's name.
ScriptReserved_GetName, &AIObject::GetName,
/// Set the object's name (its unique string identifier)
/// Set the object's unique string identifier.
// @function AIObject:SetName
// @tparam string name The object's new name
// @tparam string name The object's new name.
ScriptReserved_SetName, &AIObject::SetName,
/// Get the current room of the object
/// Get the current room of the object.
// @function AIObject:GetRoom
// @treturn Room current room of the object
// @treturn Objects.Room current room of the object.
ScriptReserved_GetRoom, &AIObject::GetRoom,
/// Get the current room number of the object
/// Get the current room number of the object.
// @function AIObject:GetRoomNumber
// @treturn int number representing the current room of the object
// @treturn int Number representing the current room of the object.
ScriptReserved_GetRoomNumber, &AIObject::GetRoomNumber,
/// Set room number of the object
/// Set room number of the object.
// This is used in conjunction with SetPosition to teleport the object to a new room.
// @function AIObject:SetRoomNumber
// @tparam int ID the ID of the new room
// @tparam int ID The ID of the new room.
ScriptReserved_SetRoomNumber, &AIObject::SetRoomNumber,
/// Retrieve the object ID
/// Retrieve the object ID.
// @function AIObject:GetObjectID
// @treturn int a number representing the ID of the object
// @treturn int A number representing the ID of the object.
ScriptReserved_GetObjectID, &AIObject::GetObjectID,
/// Change the object's ID. This will change the type of AI object it is.
/// Change the object ID. This will change the type of AI object it is.
// Note that a baddy will gain the behaviour of the tile it's on _before_ said baddy is triggered.
// This means that changing the type of an AI object beneath a moveable will have no effect.
// Instead, this function can be used to change an object that the baddy isn't standing on.
// For example, you could have a pair of AI_GUARD objects, and change one or the other two
// AI_PATROL_1 based on whether the player has a certain item or not.
// @function AIObject:SetObjectID
// @tparam Objects.ObjID ID the new ID
// @tparam Objects.ObjID ID the new ID.
// @usage
// aiObj = TEN.Objects.GetMoveableByName("ai_guard_sphinx_room")
// aiObj:SetObjectID(TEN.Objects.ObjID.AI_PATROL1)

View file

@ -29,45 +29,45 @@ void CameraObject::Register(sol::table& parent)
sol::meta_function::index, IndexError,
sol::meta_function::new_index, NewIndexError,
/// Get the camera's position
/// Get the camera's position.
// @function Camera:GetPosition
// @treturn Vec3 a copy of the camera's position
// @treturn Vec3 Camera's position.
ScriptReserved_GetPosition, &CameraObject::GetPos,
/// Set the camera's position
/// Set the camera's position.
// @function Camera:SetPosition
// @tparam Vec3 position the new position of the camera
// @tparam Vec3 position The new position of the camera.
ScriptReserved_SetPosition, &CameraObject::SetPos,
/// Get the camera's unique string identifier
// @function Camera:GetName
// @treturn string the camera's name
// @treturn string the camera's name.
ScriptReserved_GetName, &CameraObject::GetName,
/// Set the camera's name (its unique string identifier)
/// Set the camera's name (its unique string identifier).
// @function Camera:SetName
// @tparam string name The camera's new name
// @tparam string name The camera's new name.
ScriptReserved_SetName, &CameraObject::SetName,
/// Get the current room of the camera
/// Get the current room of the camera.
// @function Camera:GetRoom
// @treturn Room current room of the camera
// @treturn Objects.Room Current room of the camera.
ScriptReserved_GetRoom, &CameraObject::GetRoom,
/// Get the current room number of the camera
/// Get the current room number of the camera.
// @function Camera:GetRoomNumber
// @treturn int number representing the current room of the camera
// @treturn int Number representing the current room of the camera.
ScriptReserved_GetRoomNumber, &CameraObject::GetRoomNumber,
/// Set room of camera
/// Set room of camera.
// This is used in conjunction with SetPosition to teleport the camera to a new room.
// @function Camera:SetRoomNumber
// @tparam int ID the ID of the new room
// @tparam int ID The ID of the new room.
ScriptReserved_SetRoomNumber, &CameraObject::SetRoomNumber,
/// Active the camera during that frame.
/// Activate the camera for the current game frame.
// @function Camera:PlayCamera
// @tparam[opt] Moveable Target If you put a moveable, the camera will look at it. Otherwise, it will look at Lara.
// @tparam[opt] Objects.Moveable target If you put a moveable, the camera will look at it. Otherwise, it will look at Lara.
ScriptReserved_PlayCamera, &CameraObject::PlayCamera);
}

View file

@ -345,7 +345,7 @@ int LaraObject::GetAmmoCount() const
/// Get current vehicle, if it exists.
// @function LaraObject:GetVehicle
// @treturn Objects.Moveable current vehicle (nil if no vehicle present).
// @treturn Objects.Moveable Current vehicle (nil if no vehicle present).
// @usage
// local vehicle = Lara:GetVehicle()
std::unique_ptr<Moveable> LaraObject::GetVehicle() const
@ -390,7 +390,7 @@ std::unique_ptr<Moveable> LaraObject::GetPlayerInteractedMoveable() const
/// Check if a held torch is lit.
// @function LaraObject:IsTorchLit
// @treturn bool True if lit, otherwise false.
// @treturn bool True if lit, otherwise false (also false if there is no torch in hand).
// @usage
// local isTorchLit = Lara:IsTorchLit()
bool LaraObject::IsTorchLit() const

View file

@ -41,17 +41,17 @@ associated getters and setters. If you do not know what to set for these,
most can just be ignored (see usage).
@function Moveable
@tparam Objects.ObjID object ID
@tparam Objects.ObjID objectID Object ID.
@tparam string name Lua name.
@tparam Vec3 position position in level
@tparam Rotation rotation rotation rotation about x, y, and z axes (default Rotation(0, 0, 0))
@tparam int roomNumber the room number the moveable is in (default: calculated automatically).
@tparam int animNumber animation number
@tparam int frameNumber frame number
@tparam int hp Hit points.
@tparam int OCB Object code bits.
@tparam table AIBits table with AI bits (default { 0, 0, 0, 0, 0, 0 })
@treturn Moveable A new Moveable object (a wrapper around the new object)
@tparam Vec3 position Position in level.
@tparam[opt] Rotation rotation Rotation about x, y, and z axes.
@tparam[opt] int roomNumber The room number the moveable is in. Needed if you are dealing with overlapping rooms and need to force certain room number.
@tparam[opt] int animNumber Animation number.
@tparam[opt] int frameNumber Frame number.
@tparam[opt] int hp Hit points.
@tparam[opt] int OCB Object code bits.
@tparam[opt] table AIBits Table with six AI bits.
@treturn Objects.Moveable A new Moveable object.
@usage
local item = Moveable(
@ -94,6 +94,10 @@ static std::unique_ptr<Moveable> Create(GAME_OBJECT_ID objID, const std::string&
{
scriptMov->SetHP(std::get<int>(hp));
}
else
{
scriptMov->SetHP(Objects[objID].HitPoints);
}
scriptMov->SetOcb(ValueOr<int>(ocb, 0));
scriptMov->SetAIBits(ValueOr<aiBitsType>(aiBits, aiBitsType{}));
@ -242,9 +246,9 @@ void Moveable::Initialize()
_initialized = true;
}
/// Retrieve the object ID
/// Retrieve the object ID.
// @function Moveable:GetObjectID
// @treturn Objects.ObjID a number representing the ID of the object.
// @treturn Objects.ObjID A number representing the ID of the object.
GAME_OBJECT_ID Moveable::GetObjectID() const
{
return _moveable->ObjectNumber;
@ -252,7 +256,7 @@ GAME_OBJECT_ID Moveable::GetObjectID() const
/// Change the object's ID. This will literally change the object.
// @function Moveable:SetObjectID
// @tparam Objects.ObjID objectID the new ID
// @tparam Objects.ObjID objectID The new ID.
// @usage
// shiva = TEN.Objects.GetMoveableByName("shiva_60")
// shiva:SetObjectID(TEN.Objects.ObjID.BIGMEDI_ITEM)
@ -291,17 +295,17 @@ int Moveable::GetIndex() const
/// 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.
// @function Moveable:SetOnHit
// @tparam function callback function in LevelFuncs hierarchy to call when moveable is shot
// @tparam function function Callback function in LevelFuncs hierarchy to call when moveable is shot.
void Moveable::SetOnHit(const TypeOrNil<LevelFunc>& cb)
{
SetLevelFuncCallback(cb, ScriptReserved_SetOnHit, *this, _moveable->Callbacks.OnHit);
}
/// 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.
// @function Moveable:SetOnKilled
// @tparam function callback function in LevelFuncs hierarchy to call when enemy is killed
// @tparam function function Callback function in LevelFuncs hierarchy to call when moveable is killed.
// @usage
// LevelFuncs.baddyKilled = function(theBaddy) print("You killed a baddy!") end
// baddy:SetOnKilled(LevelFuncs.baddyKilled)
@ -310,9 +314,9 @@ void Moveable::SetOnKilled(const TypeOrNil<LevelFunc>& cb)
SetLevelFuncCallback(cb, ScriptReserved_SetOnKilled, *this, _moveable->Callbacks.OnKilled);
}
/// 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.
// @function Moveable:SetOnCollidedWithObject
// @tparam function func callback function to be called (must be in LevelFuncs hierarchy). This function can take two arguments; these will store the two @{Moveable}s taking part in the collision.
// @tparam function function Callback function to be called (must be in LevelFuncs hierarchy). This function can take two arguments; these will store the two @{Moveable}s taking part in the collision.
// @usage
// -- obj1 is the collision moveable
// -- obj2 is the collider moveable
@ -328,7 +332,7 @@ void Moveable::SetOnCollidedWithObject(const TypeOrNil<LevelFunc>& cb)
/// 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.
// @function Moveable:SetOnCollidedWithRoom
// @tparam function func callback function to be called (must be in LevelFuncs hierarchy)
// @tparam function function Callback function to be called (must be in LevelFuncs hierarchy).
// @usage
// LevelFuncs.roomCollided = function(obj)
// print(obj:GetName() .. " collided with room geometry")
@ -339,22 +343,18 @@ void Moveable::SetOnCollidedWithRoom(const TypeOrNil<LevelFunc>& cb)
SetLevelFuncCallback(cb, ScriptReserved_SetOnCollidedWithRoom, *this, _moveable->Callbacks.OnRoomCollided);
}
/// 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.
// @function Moveable:GetName
// @treturn string the moveable's name
// @treturn string The moveable's name.
std::string Moveable::GetName() const
{
return _moveable->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.
// @function Moveable:SetName
// @tparam string name the new moveable's name
// @treturn bool true if we successfully set the name, false otherwise (e.g. if another object has the name already)
// @tparam string name The new moveable's name.
// @treturn bool true if name was successfully set, false otherwise (e.g. if another moveable has the name already).
bool Moveable::SetName(const std::string& id)
{
if (!ScriptAssert(!id.empty(), "Name cannot be blank. Not setting name."))
@ -382,21 +382,18 @@ bool Moveable::SetName(const std::string& id)
return true;
}
/// Get the moveable's position
/// Get the moveable's position.
// @function Moveable:GetPosition
// @treturn Vec3 a copy of the moveable's position
// @treturn Vec3 Moveable's position.
Vec3 Moveable::GetPosition() const
{
return Vec3(_moveable->Pose.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.
// @function Moveable:SetPosition
// @tparam Vec3 position the new position of the moveable
// @bool[opt] updateRoom Will room changes be automatically detected? Set to false if you are using overlapping rooms (default: true)
// @tparam Vec3 position The new position of the moveable.
// @bool[opt=true] updateRoom Will room changes be automatically detected? Set to false if you are using overlapping rooms.
void Moveable::SetPosition(const Vec3& pos, sol::optional<bool> updateRoom)
{
constexpr auto BIG_DISTANCE_THRESHOLD = BLOCK(1);
@ -439,10 +436,10 @@ Vec3 Moveable::GetJointPos(int jointIndex, sol::optional<Vec3> offset) const
return Vec3(GetJointPosition(_moveable, jointIndex, convertedOffset));
}
/// Get the object's joint rotation
/// Get the object's joint rotation.
// @function Moveable:GetJointRotation
// @tparam int index Index of a joint to get rotation.
// @treturn Rotation a calculated copy of the moveable's joint rotation
// @treturn Rotation Moveable's joint rotation.
Rotation Moveable::GetJointRot(int jointIndex) const
{
auto point1 = GetJointPosition(_moveable, jointIndex);
@ -468,7 +465,7 @@ Rotation Moveable::GetJointRot(int jointIndex) const
/// Get the moveable's rotation.
// @function Moveable:GetRotation
// @treturn Rotation A copy of the moveable's rotation.
// @treturn Rotation Moveable's rotation.
Rotation Moveable::GetRotation() const
{
return
@ -481,7 +478,7 @@ Rotation Moveable::GetRotation() const
/// Get the moveable's visual scale.
// @function Moveable:GetScale
// @treturn Vec3 A copy of the moveable's visual scale.
// @treturn Vec3 Moveable's visual scale.
Vec3 Moveable::GetScale() const
{
return Vec3(_moveable->Pose.Scale);
@ -489,7 +486,7 @@ Vec3 Moveable::GetScale() const
/// Set the moveable's rotation.
// @function Moveable:SetRotation
// @tparam Rotation rotation The moveable's new rotation
// @tparam Rotation rotation The moveable's new rotation.
void Moveable::SetRotation(const Rotation& rot)
{
constexpr auto BIG_ANGLE_THRESHOLD = ANGLE(30.0f);
@ -514,18 +511,18 @@ void Moveable::SetScale(const Vec3& scale)
_moveable->Pose.Scale = scale.ToVector3();
}
/// Get current HP (hit points/health points)
/// Get current HP (hit points / health points).
// @function Moveable:GetHP
// @treturn int the amount of HP the moveable currently has
// @treturn int The amount of HP the moveable currently has.
short Moveable::GetHP() const
{
return _moveable->HitPoints;
}
/// Set current HP (hit points/health points)
/// Set current HP (hit points / health points).
// Clamped to [0, 32767] for "intelligent" entities (i.e. anything with AI); clamped to [-32767, 32767] otherwise.
// @function Moveable:SetHP
// @tparam int HP the amount of HP to give the moveable
// @tparam int HP The amount of HP to give the moveable.
void Moveable::SetHP(short hp)
{
if (Objects[_moveable->ObjectNumber].intelligent && hp < 0)
@ -541,25 +538,25 @@ void Moveable::SetHP(short hp)
_moveable->HitPoints = hp;
}
/// Get HP definded for that object type (hit points/health points) (Read Only).
/// Get HP definded for that object type (hit points / health points).
// @function Moveable:GetSlotHP
// @treturn int the moveable's slot default hit points
// @treturn int The moveable's slot default hit points.
short Moveable::GetSlotHP() const
{
return Objects[_moveable->ObjectNumber].HitPoints;
}
/// Get OCB (object code bit) of the moveable
/// Get OCB (object code bit) of the moveable.
// @function Moveable:GetOCB
// @treturn int the moveable's current OCB value
// @treturn int The moveable's current OCB value.
short Moveable::GetOcb() const
{
return _moveable->TriggerFlags;
}
/// Set OCB (object code bit) of the moveable
/// Set OCB (object code bit) of the moveable.
// @function Moveable:SetOCB
// @tparam int OCB the new value for the moveable's OCB
// @tparam int OCB The new value for the moveable's OCB.
void Moveable::SetOcb(short ocb)
{
_moveable->TriggerFlags = ocb;
@ -568,7 +565,7 @@ void Moveable::SetOcb(short ocb)
/// Set the effect for this moveable.
// @function Moveable:SetEffect
// @tparam Effects.EffectID effect Type of effect to assign.
// @tparam[opt] float timeout time (in seconds) after which effect turns off.
// @tparam[opt] float timeout Time (in seconds) after which effect turns off.
void Moveable::SetEffect(EffectType effectType, sol::optional<float> timeout)
{
int realTimeout = timeout.has_value() ? int(timeout.value() * FPS) : -1;
@ -604,7 +601,7 @@ void Moveable::SetEffect(EffectType effectType, sol::optional<float> timeout)
}
}
/// Set custom colored burn effect to moveable
/// Set custom colored burn effect to moveable.
// @function Moveable:SetCustomEffect
// @tparam Color color1 The primary color of the effect (also used for lighting).
// @tparam Color color2 The secondary color of the effect.
@ -617,7 +614,7 @@ void Moveable::SetCustomEffect(const ScriptColor& col1, const ScriptColor& col2,
ItemCustomBurn(_moveable, color1, color2, realTimeout);
}
/// Get current moveable effect
/// Get current moveable effect.
// @function Moveable:GetEffect
// @treturn Effects.EffectID Effect type currently assigned.
EffectType Moveable::GetEffect() const
@ -625,16 +622,16 @@ EffectType Moveable::GetEffect() const
return _moveable->Effect.Type;
}
/// Get the value stored in ItemFlags[index]
/// Get the value stored in ItemFlags[index].
// @function Moveable:GetItemFlags
// @tparam int index Index of the ItemFlag, can be between 0 and 7.
// @treturn int the value contained in the ItemFlags[index]
// @treturn int The value contained in the ItemFlags[index].
short Moveable::GetItemFlags(int index) const
{
return _moveable->ItemFlags[index];
}
/// Stores a value in ItemFlags[index]
/// Stores a value in ItemFlags[index].
// @function Moveable:SetItemFlags
// @tparam short value Value to store in the moveable's ItemFlags[index].
// @tparam int index Index of the ItemFlag where to store the value.
@ -643,9 +640,9 @@ void Moveable::SetItemFlags(short value, int index)
_moveable->ItemFlags[index] = value;
}
/// Get the location value stored in the Enemy AI
/// Get the location value stored in the Enemy AI.
// @function Moveable:GetLocationAI
// @treturn short the value contained in the LocationAI of the creature.
// @treturn short The value contained in the LocationAI of the creature.
short Moveable::GetLocationAI() const
{
if (_moveable->IsCreature())
@ -674,23 +671,23 @@ void Moveable::SetLocationAI(short value)
}
}
/// Get the moveable's color
/// Get the moveable's color.
// @function Moveable:GetColor
// @treturn Color a copy of the moveable's color
// @treturn Color Moveable's color.
ScriptColor Moveable::GetColor() const
{
return ScriptColor{ _moveable->Model.Color };
}
/// Set the moveable's color
/// Set the moveable's color.
// @function Moveable:SetColor
// @tparam Color color the new color of the moveable
// @tparam Color color The new color of the moveable.
void Moveable::SetColor(const ScriptColor& color)
{
_moveable->Model.Color = color;
}
/// 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
// have a *1* in the corresponding cell. Otherwise, the cell will hold
@ -704,7 +701,7 @@ void Moveable::SetColor(const ScriptColor& color)
// 6 - Patrol 2
//
// @function Moveable:GetAIBits
// @treturn table a table of AI bits
// @treturn table A table of AI bits.
aiBitsType Moveable::GetAIBits() const
{
static_assert(63 == ALL_AIOBJ);
@ -719,11 +716,11 @@ aiBitsType Moveable::GetAIBits() const
return ret;
}
/// 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.
// @function Moveable:SetAIBits
// @tparam table bits the table of AI bits
// @tparam table bits A table of AI bits.
// @usage
// local sas = TEN.Objects.GetMoveableByName("sas_enemy")
// sas:SetAIBits({1, 0, 0, 0, 0, 0})
@ -740,7 +737,7 @@ void Moveable::SetAIBits(aiBitsType const & bits)
/// Retrieve the index of the current state.
// This corresponds to the number shown in the item's state ID field in WadTool.
// @function Moveable:GetState
// @treturn int the index of the active state
// @treturn int The index of the active state.
int Moveable::GetStateNumber() const
{
return _moveable->Animation.ActiveState;
@ -749,7 +746,7 @@ int Moveable::GetStateNumber() const
/// 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.
// @function Moveable:GetTargetState
// @treturn int the index of the target state
// @treturn int The index of the target state.
int Moveable::GetTargetStateNumber() const
{
return _moveable->Animation.TargetState;
@ -759,7 +756,7 @@ int Moveable::GetTargetStateNumber() const
// Performs no bounds checking. *Ensure the number given is correct, else
// object may end up in corrupted animation state.*
// @function Moveable:SetState
// @tparam int index the index of the desired state
// @tparam int index The index of the desired state.
void Moveable::SetStateNumber(int stateNumber)
{
_moveable->Animation.TargetState = stateNumber;
@ -769,7 +766,7 @@ void Moveable::SetStateNumber(int stateNumber)
// In certain cases, moveable may play animations from another object slot. Use this
// function when you need to identify such cases.
// @function Moveable:GetAnimSlot
// @treturn int animation slot ID
// @treturn int Animation slot ID.
int Moveable::GetAnimSlot() const
{
return _moveable->Animation.AnimObjectID;
@ -778,7 +775,7 @@ int Moveable::GetAnimSlot() const
/// Retrieve the index of the current animation.
// This corresponds to the number shown in the item's animation list in WadTool.
// @function Moveable:GetAnim
// @treturn int the index of the active animation
// @treturn int The index of the active animation.
int Moveable::GetAnimNumber() const
{
return _moveable->Animation.AnimNumber - Objects[_moveable->Animation.AnimObjectID].animIndex;
@ -788,8 +785,8 @@ int Moveable::GetAnimNumber() const
// Performs no bounds checking. *Ensure the number given is correct, else
// object may end up in corrupted animation state.*
// @function Moveable:SetAnim
// @tparam int index the index of the desired anim
// @tparam[opt] int slot slot ID of the desired anim (if omitted, moveable's own slot ID is used)
// @tparam int index The index of the desired animation.
// @tparam[opt] int slot Slot ID of the desired anim (if omitted, moveable's own slot ID is used).
void Moveable::SetAnimNumber(int animNumber, sol::optional<int> slotIndex)
{
SetAnimation(*_moveable, (GAME_OBJECT_ID)slotIndex.value_or(_moveable->ObjectNumber), animNumber);
@ -798,7 +795,7 @@ void Moveable::SetAnimNumber(int animNumber, sol::optional<int> slotIndex)
/// Retrieve frame number.
// This is the current frame of the object's active animation.
// @function Moveable:GetFrame
// @treturn int the current frame of the active animation
// @treturn int The current frame of the active animation.
int Moveable::GetFrameNumber() const
{
return (_moveable->Animation.FrameNumber - GetAnimData(*_moveable).frameBase);
@ -808,7 +805,7 @@ int Moveable::GetFrameNumber() const
// 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.
// @function Moveable:GetVelocity
// @treturn Vec3 current object velocity
// @treturn Vec3 Current object velocity.
Vec3 Moveable::GetVelocity() const
{
return Vec3(
@ -821,7 +818,7 @@ Vec3 Moveable::GetVelocity() const
// 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.
// @function Moveable:SetVelocity
// @tparam Vec3 velocity velocity represented as vector
// @tparam Vec3 velocity Velocity represented as vector.
void Moveable::SetVelocity(Vec3 velocity)
{
if (_moveable->IsCreature())
@ -836,7 +833,7 @@ void Moveable::SetVelocity(Vec3 velocity)
// the WadTool animation editor. If the animation has no frames, the only valid argument
// is -1.
// @function Moveable:SetFrame
// @tparam int frame the new frame number
// @tparam int frame The new frame number.
void Moveable::SetFrameNumber(int frameNumber)
{
const auto& anim = GetAnimData(*_moveable);
@ -865,9 +862,9 @@ int Moveable::GetEndFrame() const
return (anim.frameEnd - anim.frameBase);
}
/// Determine whether the moveable is active or not
/// Determine whether the moveable is active or not.
// @function Moveable:GetActive
// @treturn bool true if the moveable is active
// @treturn bool True if the moveable is active.
bool Moveable::GetActive() const
{
return _moveable->Active;
@ -880,23 +877,23 @@ void Moveable::SetActive(bool isActive)
/// Get the hit status of the moveable.
// @function Moveable:GetHitStatus
// @treturn bool true if the moveable was hit by something in the last gameplay frame, false otherwise
// @treturn bool true if the moveable was hit by something in the last gameplay frame, false otherwise.
bool Moveable::GetHitStatus() const
{
return _moveable->HitStatus;
}
/// Get the current room of the object
/// Get the current room of the moveable.
// @function Moveable:GetRoom
// @treturn Objects.Room current room of the object
// @treturn Objects.Room Current room of the moveable.
std::unique_ptr<Room> Moveable::GetRoom() const
{
return std::make_unique<Room>(g_Level.Rooms[_moveable->RoomNumber]);
}
/// Get the current room number of the object
/// Get the current room number of the moveable.
// @function Moveable:GetRoomNumber
// @treturn int number representing the current room of the object
// @treturn int Number representing the current room of the moveable.
int Moveable::GetRoomNumber() const
{
return _moveable->RoomNumber;
@ -950,21 +947,21 @@ void Moveable::SetStatus(ItemStatus status)
_moveable->Status = status;
}
/// Get number of meshes for a particular object
/// Get number of meshes for a particular object.
// Returns number of meshes in an object
// @function Moveable:GetMeshCount
// @treturn int number of meshes
// @treturn int Number of meshes.
short Moveable::GetMeshCount() const
{
return Objects[_moveable->ObjectNumber].nmeshes;
}
/// 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.
// @function Moveable:GetMeshVisible
// @int index index of a mesh
// @treturn bool visibility status
// @tparam int index Index of a mesh.
// @treturn bool Visibility status.
bool Moveable::GetMeshVisible(int meshId) const
{
if (!MeshExists(meshId))
@ -973,11 +970,11 @@ bool Moveable::GetMeshVisible(int meshId) const
return _moveable->MeshBits.Test(meshId);
}
/// Makes specified mesh visible or invisible
/// Makes specified mesh visible or invisible.
// Use this to show or hide a specified mesh of an object.
// @function Moveable:SetMeshVisible
// @int index index of a mesh
// @bool isVisible true if you want the mesh to be visible, false otherwise
// @tparam int index Index of a mesh.
// @tparam bool isVisible true if you want the mesh to be visible, false otherwise.
void Moveable::SetMeshVisible(int meshId, bool isVisible)
{
if (!MeshExists(meshId))
@ -993,10 +990,10 @@ void Moveable::SetMeshVisible(int meshId, bool isVisible)
}
}
/// 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().
// @function Moveable:ShatterMesh
// @int index index of a mesh
// @tparam int index Index of a mesh to shatter.
void Moveable::ShatterMesh(int meshId)
{
if (!MeshExists(meshId))
@ -1005,12 +1002,11 @@ void Moveable::ShatterMesh(int meshId)
ExplodeItemNode(_moveable, meshId, 0, 128);
}
/// 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.
// @function Moveable:GetMeshSwapped
// @int index index of a mesh
// @treturn bool mesh swap status
// @tparam int index Index of a mesh.
// @treturn bool Mesh swap status.
bool Moveable::GetMeshSwapped(int meshId) const
{
if (!MeshExists(meshId))
@ -1019,12 +1015,12 @@ bool Moveable::GetMeshSwapped(int meshId) const
return _moveable->Model.MeshIndex[meshId] == _moveable->Model.BaseMesh + meshId;
}
/// 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.
// @function Moveable:SwapMesh
// @int index index of a mesh
// @int slotIndex index of a slot to get meshswap from
// @int[opt] swapIndex index of a mesh from meshswap slot to use
// @tparam int index Index of a mesh.
// @tparam int slotIndex Index of a slot to get meshswap from.
// @tparam[opt] int swapIndex Index of a mesh from meshswap slot to use.
void Moveable::SwapMesh(int meshId, int swapSlotId, sol::optional<int> swapMeshIndex)
{
if (!MeshExists(meshId))
@ -1054,10 +1050,10 @@ void Moveable::SwapMesh(int meshId, int swapSlotId, sol::optional<int> swapMeshI
_moveable->Model.MeshIndex[meshId] = Objects[swapSlotId].meshIndex + swapMeshIndex.value();
}
/// Set state of specified mesh swap of object
/// Set state of specified mesh swap of object.
// Use this to bring back original unswapped mesh
// @function Moveable:UnswapMesh
// @int index index of a mesh to unswap
// @tparam int index Index of a mesh to unswap.
void Moveable::UnswapMesh(int meshId)
{
if (!MeshExists(meshId))
@ -1068,7 +1064,7 @@ void Moveable::UnswapMesh(int meshId)
/// Enable the item, as if a trigger for it had been stepped on.
// @function Moveable:Enable
// @tparam float timeout time (in seconds) after which moveable automatically disables (optional).
// @tparam[opt] float timeout Time (in seconds) after which moveable automatically disables.
void Moveable::EnableItem(sol::optional<float> timer)
{
if (_moveableID == NO_VALUE)
@ -1087,8 +1083,8 @@ void Moveable::EnableItem(sol::optional<float> timer)
dynamic_cast<ObjectsHandler*>(g_GameScriptEntities)->TryAddColliding(_moveableID);
}
/// 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.
// @function Moveable:Disable
void Moveable::DisableItem()
{
@ -1127,29 +1123,29 @@ void Moveable::Shatter()
}
/// Get the item's collision state.
// @treturn bool item's collision state
// @function Moveable:GetCollidable
// @treturn bool Item's collision state.
bool Moveable::GetCollidable()
{
return _moveable->Collidable;
}
/// Set the item's collision.
// @bool collidable true if the caller should be collidable, false if no collision should occur.
// @function Moveable:SetCollidable
// @bool collidable true if the caller should be collidable, false if no collision should occur.
void Moveable::SetCollidable(bool isCollidable)
{
_moveable->Collidable = isCollidable;
}
/// Make the item invisible. Alias for `Moveable:SetVisible(false)`.
// Make the item invisible. Alias for `Moveable:SetVisible(false)`.
// @function Moveable:MakeInvisible
void Moveable::MakeInvisible()
{
SetVisible(false);
}
/// Set the item's visibility. __An invisible item will have collision turned off, as if it no longer exists in the game world__.
// @bool visible true if the caller should become visible, false if it should become invisible
/// Set the item's visibility. An invisible item will have collision turned off, as if it no longer exists in the game world.
// @bool visible true if the caller should become visible, false if it should become invisible.
// @function Moveable:SetVisible
void Moveable::SetVisible(bool isVisible)
{
@ -1200,9 +1196,9 @@ void Moveable::Invalidate()
_initialized = false;
}
/// 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.
// @function Moveable:GetValid
// @treturn bool valid true if the object is still not destroyed
// @treturn bool true if the object is still not destroyed.
bool Moveable::GetValid() const
{
return _moveableID > NO_VALUE;
@ -1236,18 +1232,18 @@ bool Moveable::MeshExists(int index) const
/// Attach camera to an object.
// @function Moveable:AttachObjCamera
// @tparam int mesh Mesh of a moveable to use as a camera position.
// @tparam Moveable target Target moveable to attach camera to.
// @tparam Objects.Moveable target Target moveable to attach camera to.
// @tparam int mesh Mesh of a target moveable to use as a camera target.
void Moveable::AttachObjCamera(short camMeshId, Moveable& mov, short targetMeshId)
{
ObjCamera(_moveable, camMeshId, mov._moveable, targetMeshId, true);
}
/// Borrow animation from an object
/// Borrow animation from an object.
// @function Moveable:AnimFromObject
// @tparam Objects.ObjID objectID Object ID to take animation and stateID from.
// @tparam Objects.ObjID objectID Object ID to take animation and state ID from.
// @tparam int animNumber Animation from object.
// @tparam int stateID state State from object.
// @tparam int stateID State from object.
void Moveable::AnimFromObject(GAME_OBJECT_ID objectID, int animNumber, int stateID)
{
_moveable->Animation.AnimObjectID = objectID;

View file

@ -10,10 +10,10 @@
//
// To be used with @{Objects.Moveable.GetStatus} and @{Objects.Moveable.SetStatus} functions.
//
// - `INACTIVE` - moveable is inactive (was never activated).
// - `ACTIVE` - moveable is active.
// - `DEACTIVATED` - moveable is deactivated (was previously active and later deactivated).
// - `INVISIBLE` - moveable is invisible.
// - `INACTIVE` - Moveable is inactive (was never activated).
// - `ACTIVE` - Moveable is active.
// - `DEACTIVATED` - Moveable is deactivated (was previously active and later deactivated).
// - `INVISIBLE` - Moveable is invisible.
//
// @table Objects.MoveableStatus

View file

@ -35,88 +35,88 @@ ObjectsHandler::ObjectsHandler(sol::state* lua, sol::table& parent) :
/***
Get a moveable by its name.
@function GetMoveableByName
@tparam string name the unique name of the Moveable as set in, or generated by, Tomb Editor
@treturn Moveable a non-owning Moveable referencing the item.
@tparam string name The unique name of the moveable as set in, or generated by, Tomb Editor.
@treturn Objects.Moveable a non-owning Moveable referencing the item.
*/
_table_objects.set_function(ScriptReserved_GetMoveableByName, &ObjectsHandler::GetByName<Moveable, ScriptReserved_Moveable>, this);
/***
Get a Static by its name.
@function GetStaticByName
@tparam string name the unique name of the mesh as set in, or generated by, Tomb Editor
@treturn Static a non-owning Static referencing the mesh.
@tparam string name The unique name of the static mesh as set in, or generated by, Tomb Editor.
@treturn Objects.Static a non-owning Static referencing the static mesh.
*/
_table_objects.set_function(ScriptReserved_GetStaticByName, &ObjectsHandler::GetByName<Static, ScriptReserved_Static>, this);
/***
Get moveables by its slot.
@function GetMoveablesBySlot
@tparam Objects.ObjID slot the unique slot of the Moveable, e.g. `Objects.ObjID.ANIMATING1`
@treturn table table of Moveables referencing the given slot.
@tparam Objects.ObjID slot The unique slot of the moveable, e.g. `Objects.ObjID.ANIMATING1`.
@treturn table Table of moveables referencing the given slot.
*/
_table_objects.set_function(ScriptReserved_GetMoveablesBySlot, &ObjectsHandler::GetMoveablesBySlot<Moveable>, this);
/***
Get statics by its slot.
@function GetStaticsBySlot
@tparam int slot the unique slot of the mesh like 10
@treturn table table of Statics referencing the given slot ID.
@tparam int slot The unique numerical slot of the static mesh.
@treturn table Table of static meshes referencing the given slot.
*/
_table_objects.set_function(ScriptReserved_GetStaticsBySlot, &ObjectsHandler::GetStaticsBySlot<Static>, this);
/***
Get rooms by tag.
@function GetRoomsByTag
@tparam string tag to select rooms by
@treturn table table of Rooms containing the given tag.
@tparam string tag Tag to select rooms by.
@treturn table Table of rooms containing the given tag.
*/
_table_objects.set_function(ScriptReserved_GetRoomsByTag, &ObjectsHandler::GetRoomsByTag<Room>, this);
/***
Get a Camera by its name.
@function GetCameraByName
@tparam string name the unique name of the camera as set in, or generated by, Tomb Editor
@treturn Camera a non-owning Camera referencing the camera.
@tparam string name The unique name of the camera as set in, or generated by, Tomb Editor.
@treturn Objects.Camera A non-owning Camera referencing the camera.
*/
_table_objects.set_function(ScriptReserved_GetCameraByName, &ObjectsHandler::GetByName<CameraObject, ScriptReserved_Camera>, this);
/***
Get a Sink by its name.
@function GetSinkByName
@tparam string name the unique name of the sink as set in, or generated by, Tomb Editor
@treturn Sink a non-owning Sink referencing the sink.
@tparam string name The unique name of the sink as set in, or generated by, Tomb Editor.
@treturn Objects.Sink A non-owning Sink referencing the sink.
*/
_table_objects.set_function(ScriptReserved_GetSinkByName, &ObjectsHandler::GetByName<Sink, ScriptReserved_Sink>, this);
/***
Get a SoundSource by its name.
@function GetSoundSourceByName
@tparam string name the unique name of the sound source as set in, or generated by, Tomb Editor
@treturn SoundSource a non-owning SoundSource referencing the sound source.
@tparam string name The unique name of the sound source as set in, or generated by, Tomb Editor.
@treturn Objects.SoundSource A non-owning SoundSource referencing the sound source.
*/
_table_objects.set_function(ScriptReserved_GetSoundSourceByName, &ObjectsHandler::GetByName<SoundSource, ScriptReserved_SoundSource>, this);
/***
Get an AIObject by its name.
@function GetAIObjectByName
@tparam string name the unique name of the AIObject as set in, or generated by, Tomb Editor
@treturn AIObject a non-owning SoundSource referencing the AI moveable.
@tparam string name The unique name of the AIObject as set in, or generated by, Tomb Editor.
@treturn Objects.AIObject A non-owning AIObject referencing the AI object.
*/
_table_objects.set_function(ScriptReserved_GetAIObjectByName, &ObjectsHandler::GetByName<AIObject, ScriptReserved_AIObject>, this);
/***
Get a Volume by its name.
@function GetVolumeByName
@tparam string name the unique name of the volume as set in, or generated by, Tomb Editor
@treturn Volume a non-owning Volume referencing the room.
@tparam string name The unique name of the volume as set in, or generated by, Tomb Editor.
@treturn Objects.Volume A non-owning Volume referencing the volume.
*/
_table_objects.set_function(ScriptReserved_GetVolumeByName, &ObjectsHandler::GetByName<Volume, ScriptReserved_Volume>, this);
/***
Get a Room by its name.
@function GetRoomByName
@tparam string name the unique name of the room as set in Tomb Editor
@treturn Room a non-owning Room referencing the room.
@tparam string name The unique name of the room as set in Tomb Editor.
@treturn Objects.Room A non-owning Room referencing the room.
*/
_table_objects.set_function(ScriptReserved_GetRoomByName, &ObjectsHandler::GetByName<Room, ScriptReserved_Room>, this);

View file

@ -11,7 +11,8 @@ Constants for room flag IDs.
*/
/*** Table of Objects.RoomFlagID constants.
To be used with @{Objects.Room.SetFlag} and @{Objects.Room.GetFlag} functions.
<br>
Corresponds to room flags in Tomb Editor. To be used with @{Objects.Room.SetFlag} and @{Objects.Room.GetFlag} functions.
The following constants are inside RoomFlagID.

View file

@ -11,15 +11,15 @@ Constants for room reverb types.
*/
/*** Table of Objects.RoomReverb constants.
To be used with @{Objects.Room.GetReverbType} and @{Objects.Room.SetReverbType} functions.
<br>
Corresponds to room reverb setting set in Tomb Editor. To be used with @{Objects.Room.GetReverbType} and @{Objects.Room.SetReverbType} functions.
The following constants are inside RoomReverb.
- OUTSIDE
- SMALL
- MEDIUM
- LARGE
- PIPE
- `OUTSIDE`
- `SMALL`
- `MEDIUM`
- `LARGE`
- `PIPE`
@table Objects.RoomReverb
*/

View file

@ -27,34 +27,34 @@ void SoundSource::Register(sol::table& parent)
sol::meta_function::index, IndexError,
sol::meta_function::new_index, NewIndexError,
/// Get the sound source's position
/// Get the sound source's position.
// @function SoundSource:GetPosition
// @treturn Vec3 a copy of the sound source's position
// @treturn Vec3 Sound source's position.
ScriptReserved_GetPosition, &SoundSource::GetPos,
/// Set the sound source's position
/// Set the sound source's position.
// @function SoundSource:SetPosition
// @tparam Vec3 position the new position of the sound source
// @tparam Vec3 position The new position of the sound source.
ScriptReserved_SetPosition, &SoundSource::SetPos,
/// Get the sound source's unique string identifier
/// Get the sound source's unique string identifier.
// @function SoundSource:GetName
// @treturn string the sound source's name
// @treturn string The sound source's name.
ScriptReserved_GetName, &SoundSource::GetName,
/// Set the sound source's name (its unique string identifier)
/// Set the sound source's unique string identifier.
// @function SoundSource:SetName
// @tparam string name The sound source's new name
// @tparam string name The sound source's new name.
ScriptReserved_SetName, &SoundSource::SetName,
/// Get the sound source's unique int identifier
/// Get the sound source's sound ID.
// @function SoundSource:GetSoundID
// @treturn int the ID of the sound
// @treturn int The ID of the sound.
ScriptReserved_GetSoundID, &SoundSource::GetSoundID,
/// Set the sound source's ID
/// Set the sound source's ID.
// @function SoundSource:SetSoundID
// @tparam int name The sound source's new name
// @tparam int name The sound source's new sound ID.
ScriptReserved_SetSoundID, &SoundSource::SetSoundID
);
}

View file

@ -119,7 +119,7 @@ namespace TEN::Scripting
/// Get this static's visibility status.
// @function Static:GetActive
// @treturn bool Status. __true: visible__, __false: invisible__
// @treturn bool Status. true means visible, false otherwise.
bool Static::GetActiveStatus() const
{
return ((_static.flags & StaticMeshFlags::SM_VISIBLE) != 0);
@ -127,7 +127,7 @@ namespace TEN::Scripting
/// Get this static's collision status.
// @function Static:GetCollidable
// @treturn bool Collision status. __true: can be collided with__, __false: no collision__
// @treturn bool Collision status. true if can be collided with, false otherwise.
bool Static::GetCollidable() const
{
return ((_static.flags & StaticMeshFlags::SM_COLLISION) != 0);
@ -135,7 +135,7 @@ namespace TEN::Scripting
/// Get this static's solid collision status.
// @function Static:GetSolid
// @treturn bool Solid Status. __true: solid__, __false: soft__
// @treturn bool Solid Status. true if solid, false if soft.
bool Static::GetSolidStatus() const
{
return ((_static.flags & StaticMeshFlags::SM_SOLID) != 0);
@ -216,7 +216,7 @@ namespace TEN::Scripting
/// Set this static's solid collision status.
// @function Static:SetSolid
// @tparam bool status New status. __true: solid__, __false: soft__
// @tparam bool status New status, true is solid, false is soft.
void Static::SetSolidStatus(bool status)
{
if (status)
@ -231,7 +231,7 @@ namespace TEN::Scripting
/// Set this static's collision status.
// @function Static:SetCollidable
// @tparam bool collidable New collision status. __true: can be collided with__, __false: no collision__
// @tparam bool collidable New collision status. true if can be collided with, false: no collision.
void Static::SetCollidable(bool collidable)
{
if (collidable)

View file

@ -49,7 +49,7 @@ void Volume::Register(sol::table& parent)
}
/// Get the unique string identifier of this volume.
// @function Volume:GetName()
// @function Volume:GetName
// @treturn string Name.
std::string Volume::GetName() const
{
@ -57,7 +57,7 @@ std::string Volume::GetName() const
}
/// Get the position of this volume.
// @function Volume:GetPosition()
// @function Volume:GetPosition
// @treturn Vec3 Position.
Vec3 Volume::GetPos() const
{
@ -65,7 +65,7 @@ Vec3 Volume::GetPos() const
}
/// Get the rotation of this volume.
// @function Volume:GetRotation()
// @function Volume:GetRotation
// @treturn Rotation Rotation.
Rotation Volume::GetRot() const
{
@ -74,7 +74,7 @@ Rotation Volume::GetRot() const
}
/// Get this scale of this volume.
// @function Volume:GetScale()
// @function Volume:GetScale
// @treturn Vec3 Scale.
Vec3 Volume::GetScale() const
{
@ -82,7 +82,7 @@ Vec3 Volume::GetScale() const
}
/// Set the unique string identifier of this volume.
// @function Volume:SetName()
// @function Volume:SetName
// @tparam string name New name.
void Volume::SetName(const std::string& name)
{
@ -103,7 +103,7 @@ void Volume::SetName(const std::string& name)
}
/// Set the position of this volume.
// @function Volume:SetPosition()
// @function Volume:SetPosition
// @tparam Vec3 pos New position.
void Volume::SetPos(const Vec3& pos)
{
@ -112,7 +112,7 @@ void Volume::SetPos(const Vec3& pos)
}
/// Set the rotation of this volume.
// @function Volume:SetRotation()
// @function Volume:SetRotation
// @tparam Rotation rot New rotation.
void Volume::SetRot(const Rotation& rot)
{
@ -121,7 +121,7 @@ void Volume::SetRot(const Rotation& rot)
}
/// Set the scale of the volume.
// @function Volume:SetScale()
// @function Volume:SetScale
// @tparam Vec3 scale New scale.
void Volume::SetScale(const Vec3& scale)
{
@ -130,7 +130,7 @@ void Volume::SetScale(const Vec3& scale)
}
/// Determine if this volume is active.
// @function Volume:GetActive()
// @function Volume:GetActive
// @treturn bool Boolean representing active status.
bool Volume::GetActive() const
{
@ -138,8 +138,8 @@ bool Volume::GetActive() const
}
/// Determine if a moveable is inside this volume.
// @function Volume:IsMoveableInside()
// @tparam Objects.Moveable Moveable to be checked for containment.
// @function Volume:IsMoveableInside
// @tparam Objects.Moveable moveable Moveable to be checked for containment.
// @treturn bool Boolean representing containment status.
bool Volume::IsMoveableInside(const Moveable& mov)
{
@ -159,14 +159,14 @@ bool Volume::IsMoveableInside(const Moveable& mov)
}
/// Enable this volume.
// @function Volume:Enable()
// @function Volume:Enable
void Volume::Enable()
{
_volume.Enabled = true;
}
/// Disable this volume.
// @function Volume:Disable()
// @function Volume:Disable
void Volume::Disable()
{
ClearActivators();
@ -174,7 +174,7 @@ void Volume::Disable()
}
/// Clear the activators for this volume, allowing it to trigger again.
// @function Volume:ClearActivators()
// @function Volume:ClearActivators
void Volume::ClearActivators()
{
_volume.StateQueue.clear();

View file

@ -87,7 +87,7 @@ namespace TEN::Scripting::Sound
/// Check if the audio track is playing.
// @function IsAudioTrackPlaying
// @tparam string Track Filename to check. Should be without extension and without full directory path.
// @tparam string track Filename to check. Should be without extension and without full directory path.
static bool IsAudioTrackPlaying(const std::string& trackName)
{
return Sound_TrackIsPlaying(trackName);

View file

@ -11,9 +11,9 @@ Constants for the type of the audio tracks.
*
To be used with sound track functions, such as @{Sound.PlayAudioTrack} and @{Sound.StopAudioTrack}.
- `ONESHOT` - used for one-time music tracks.
- `LOOPED` - used for looped ambience or music.
- `VOICE` - used for dialogs. Also supports subtitles, set by @{Sound.GetCurrentSubtitle} function.
- `ONESHOT` - Used for one-time music tracks.
- `LOOPED` - Used for looped ambience or music.
- `VOICE` - Used for dialogs. Also supports subtitles, set by @{Sound.GetCurrentSubtitle} function.
@table Sound.SoundTrackType
*/

View file

@ -47,13 +47,12 @@ DisplayString::DisplayString()
For use in @{Strings.ShowString|ShowString} and @{Strings.HideString|HideString}.
@function DisplayString
@tparam string string The string to display or key of the translated string.
@tparam Vec2 Position of the string in pixel coordinates.
@tparam[opt] float scale size of the string, relative to the default size. __Default: 1.0__
@tparam[opt] Color color the color of the text. __Default: white__
@tparam[opt] bool translated If false or omitted, the input string argument will be displayed.
If true, the string argument will be the key of a translated string specified in strings.lua. __Default: false__.
@tparam Strings.DisplayStringOption table
__Default: None.__ _Please note that Strings are automatically aligned to the LEFT_
@tparam Vec2 position Position of the string in pixel coordinates.
@tparam[opt=1] float scale Size of the string, relative to the default size.
@tparam[opt=Color(255&#44; 255&#44; 255)] Color color The color of the text.
@tparam[opt=false] bool translated If false or omitted, the input string argument will be displayed.
If true, the string argument will be the key of a translated string specified in strings.lua.
@tparam[opt] Strings.DisplayStringOption flags Flags which affect visual representation of a string, such as shadow or alignment.
@treturn DisplayString A new DisplayString object.
*/
static std::unique_ptr<DisplayString> CreateString(const std::string& key, const Vec2& pos, TypeOrNil<float> scale, TypeOrNil<ScriptColor> color,
@ -140,55 +139,51 @@ void DisplayString::Register(sol::table& parent)
ScriptReserved_DisplayString,
sol::call_constructor, &DisplayStringWrapper,
/// Get the display string's color
/// Get the display string's color.
// @function DisplayString:GetColor
// @treturn Color a copy of the display string's color
// @treturn Color Display string's color.
ScriptReserved_GetColor, &DisplayString::GetColor,
/// Set the display string's color
/// Set the display string's color.
// @function DisplayString:SetColor
// @tparam Color color the new color of the display string
// @tparam Color color The new color of the display string.
ScriptReserved_SetColor, &DisplayString::SetColor,
/// Get the string key to use. If `isTranslated` is true when @{DisplayString}
// is called, this will be the string key for the translation that will be displayed.
// If false or omitted, this will be the string that's displayed.
// @function DisplayString:GetKey()
// @treturn string the string to use
/// Get the string key.
// @function DisplayString:GetKey
// @treturn string The string key.
ScriptReserved_GetKey, &DisplayString::GetKey,
/// Set the string key to use. If `isTranslated` is true when @{DisplayString}
// is called, this will be the string key for the translation that will be displayed.
// If false or omitted, this will be the string that's displayed.
// @function DisplayString:SetKey()
// @tparam string string the new key for the display string
/// Set the string key to use.
// @function DisplayString:SetKey
// @tparam string key The new key for the display string.
ScriptReserved_SetKey, &DisplayString::SetKey,
/// Set the scale of the string.
// @function DisplayString:SetScale()
// @function DisplayString:SetScale
// @tparam float scale New scale of the string relative to the default size.
ScriptReserved_SetScale, &DisplayString::SetScale,
/// Get the scale of the string.
// @function DisplayString:GetScale()
// @function DisplayString:GetScale
// @treturn float Scale.
ScriptReserved_GetScale, &DisplayString::GetScale,
/// Set the position of the string.
// Screen-space coordinates are expected.
// @function DisplayString:SetPosition()
// @function DisplayString:SetPosition
// @tparam Vec2 pos New position in pixel coordinates.
ScriptReserved_SetPosition, &DisplayString::SetPosition,
/// Get the position of the string.
// Screen-space coordinates are returned.
// @function DisplayString:GetPosition()
// @function DisplayString:GetPosition
// @treturn Vec2 pos Position in pixel coordinates.
ScriptReserved_GetPosition, &DisplayString::GetPosition,
/// Set the display string's flags
// @function DisplayString:SetFlags()
// @tparam table table the new table with display flags options
/// Set the display string's flags.
// @function DisplayString:SetFlags
// @tparam table table The new table with display flags options.
// @usage
// local varDisplayString = DisplayString('example string', 0, 0, Color(255, 255, 255), false)
// possible values:
@ -200,10 +195,7 @@ void DisplayString::Register(sol::table& parent)
// varDisplayString:SetFlags{ TEN.Strings.DisplayStringOption.CENTER }
ScriptReserved_SetFlags, &DisplayString::SetFlags,
/// Set translated parameter of the string
// @function DisplayString:SetTranslated
// @tparam bool shouldTranslate if true, the string's key will be used as the key for the translation that will be displayed.
// If false, the key itself will be displayed
// DEPRECATED
ScriptReserved_SetTranslated, &DisplayString::SetTranslated);
}

View file

@ -17,10 +17,10 @@ Constants for Display String Options.
/*** Strings.DisplayStringOption constants. To be used with @{Strings.DisplayString} class.
@table Strings.DisplayStringOption
- `CENTER` - set the horizontal origin point to the center of the string.
- `RIGHT` - set the horizontal origin point to right of the string.
- `SHADOW` - gives the string a small drop shadow.
- `BLINK` - blinks the string
- `CENTER` - Set the horizontal origin point to the center of the string.
- `RIGHT` - Set the horizontal origin point to right of the string.
- `SHADOW` - Gives the string a small drop shadow.
- `BLINK` - Blinks the string.
*/
enum class DisplayStringOptions

View file

@ -21,31 +21,26 @@ StringsHandler::StringsHandler(sol::state* lua, sol::table& parent) :
/***
Show some text on-screen.
@tparam DisplayString str the string object to draw
@function ShowString
@tparam float time the time in seconds for which to show the string.
If not given, the string will have an "infinite" life, and will show
@tparam DisplayString string The string object to draw.
@tparam[opt] float time The time in seconds for which to show the string. If not given, the string will have an "infinite" life, and will show
until @{HideString} is called or until the level is finished.
Default: nil (i.e. infinite)
@tparam bool autoDelete should be string automatically deleted after timeout is reached.
If not given, the string will remain allocated even after timeout is reached, and can be
shown again without re-initialization.
Default: true
@tparam[opt=true] bool autoDelete Should be string automatically deleted after timeout is reached. If not given, the string will remain
allocated even after timeout is reached, and can be shown again without re-initialization.
*/
table.set_function(ScriptReserved_ShowString, &StringsHandler::ShowString, this);
/***
Hide some on-screen text.
@function HideString
@tparam DisplayString str the string object to hide. Must previously have been shown
with a call to @{ShowString}, or this function will have no effect.
@tparam DisplayString string The string object to hide. Must previously have been shown with a call to @{ShowString}, or this function will have no effect.
*/
table.set_function(ScriptReserved_HideString, [this](const DisplayString& string) { ShowString(string, 0.0f, false); });
/***
Checks if the string is shown
@function IsStringDisplaying
@tparam DisplayString str the string object to be checked
@tparam DisplayString string The string object to be checked.
@treturn bool true if it is shown, false if it is hidden
*/
table.set_function(ScriptReserved_IsStringDisplaying, &StringsHandler::IsStringDisplaying, this);

View file

@ -37,9 +37,9 @@ namespace TEN::Scripting::Types
"a", sol::property(&ScriptColor::GetA, &ScriptColor::SetA));
}
/// @int R red component
// @int G green component
// @int B blue component
/// @int R Red component.
// @int G Green component.
// @int B Blue component.
// @treturn Color A new Color object.
// @function Color
ScriptColor::ScriptColor(byte r, byte g, byte b) :

View file

@ -26,13 +26,12 @@ namespace TEN::Scripting::Util
// @tentable Util
// @pragma nostrip
/// Determine if there is a clear line of sight between two positions.
// NOTE: Limited to room geometry. Objects are ignored.
// @function HasLineOfSight()
/// Determine if there is a clear line of sight between two positions. Limited to room geometry. Objects are ignored.
// @function HasLineOfSight
// @tparam float roomID Room ID of the first position's room.
// @tparam Vec3 posA First position.
// @tparam Vec3 posB Second position.
// @treturn bool __true__ if there is a line of sight, __false__ if not.
// @treturn bool true if there is a line of sight, false if not.
// @usage
// local flamePlinthPos = flamePlinth:GetPosition() + Vec3(0, flamePlinthHeight, 0);
// print(Misc.HasLineOfSight(enemyHead:GetRoomNumber(), enemyHead:GetPosition(), flamePlinthPos))
@ -122,7 +121,7 @@ namespace TEN::Scripting::Util
/// Pick a moveable by the given display position.
// @function PickMoveableByDisplayPosition
// @tparam Vec2 Display space position in percent.
// @tparam Vec2 position Display space position in percent.
// @treturn Objects.Moveable Picked moveable (nil if no moveable was found under the cursor).
static sol::optional <std::unique_ptr<Moveable>> PickMoveable(const Vec2& screenPos)
{
@ -140,7 +139,7 @@ namespace TEN::Scripting::Util
/// Pick a static mesh by the given display position.
// @function PickStaticByDisplayPosition
// @tparam Vec2 Display space position in percent.
// @tparam Vec2 position Display space position in percent.
// @treturn Objects.Static Picked static mesh (nil if no static mesh was found under the cursor).
static sol::optional <std::unique_ptr<Static>> PickStatic(const Vec2& screenPos)
{
@ -165,9 +164,9 @@ namespace TEN::Scripting::Util
//
//<a href="https://www.lua.org/manual/5.4/manual.html#pdf-debug.traceback">debug.traceback</a>
//@function PrintLog
//@tparam string message to be displayed within the Log
//@tparam Util.LogLevel logLevel log level to be displayed
//@tparam[opt] bool allowSpam true allows spamming of the message
//@tparam string Message to be displayed within the log.
//@tparam Util.LogLevel logLevel Log level to be displayed.
//@tparam[opt] bool allowSpam If true, allows continuous spamming of the message.
//
//@usage
//PrintLog('test info log', LogLevel.INFO)

View file

@ -21,13 +21,13 @@ enum class ScriptCameraType
/*** Table of View.CameraType constants. To be used with @{View.GetCameraType} function.
@table CameraType
- `NORMAL` - standard in-game camera when weapons are holstered.
- `COMBAT` - in-game camera when weapons are unholstered.
- `FIXED` - classic fixed camera.
- `LOOK` - look camera.
- `FLYBY` - flyby or tracking camera.
- `BINOCULARS` - binoculars is active.
- `LASERSIGHT` - lasersight is active.
- `NORMAL` - Standard in-game camera when weapons are holstered.
- `COMBAT` - In-game camera when weapons are unholstered.
- `FIXED` - Classic fixed camera.
- `LOOK` - Look camera.
- `FLYBY` - Flyby or tracking camera.
- `BINOCULARS` - Binocular camera.
- `LASERSIGHT` - Lasersight camera.
*/
static const std::unordered_map<std::string, ScriptCameraType> CAMERA_TYPE

View file

@ -52,12 +52,12 @@ namespace TEN::Scripting::DisplaySprite
/// Create a DisplaySprite object.
// @function DisplaySprite
// @tparam Objects.ObjID.SpriteConstants ID of the sprite sequence object.
// @tparam int int spriteID ID of the sprite in the sequence.
// @tparam Objects.ObjID.SpriteConstants objectID ID of the sprite sequence object.
// @tparam int index Index of the sprite in the sequence.
// @tparam Vec2 pos Display position in percent.
// @tparam float rot Rotation in degrees.
// @tparam Vec2 scale Horizontal and vertical scale in percent. Scaling is interpreted by the DisplaySpriteEnum.ScaleMode passed to the Draw() function call.
// @tparam[opt] Color color Color. __Default: Color(255, 255, 255, 255)__
// @tparam[opt=Color(255&#44; 255&#44; 255)] Color color Color.
// @treturn DisplaySprite A new DisplaySprite object.
ScriptDisplaySprite::ScriptDisplaySprite(GAME_OBJECT_ID objectID, int spriteID, const Vec2& pos, float rot, const Vec2& scale, const ScriptColor& color)
{
@ -98,7 +98,7 @@ namespace TEN::Scripting::DisplaySprite
}
/// Get the object ID of the sprite sequence object used by the display sprite.
// @function DisplaySprite:GetObjectID()
// @function DisplaySprite:GetObjectID
// @treturn Objects.ObjID.SpriteConstants Sprite sequence object ID.
GAME_OBJECT_ID ScriptDisplaySprite::GetObjectID() const
{
@ -106,7 +106,7 @@ namespace TEN::Scripting::DisplaySprite
}
/// Get the sprite ID in the sprite sequence object used by the display sprite.
// @function DisplaySprite:GetSpriteID()
// @function DisplaySprite:GetSpriteID
// @treturn int Sprite ID in the sprite sequence object. Value __-1__ means that it is a background video, played using @{View.PlayVideo}.
int ScriptDisplaySprite::GetSpriteID() const
{
@ -114,7 +114,7 @@ namespace TEN::Scripting::DisplaySprite
}
/// Get the display position of the display sprite in percent.
// @function DisplaySprite:GetPosition()
// @function DisplaySprite:GetPosition
// @treturn Vec2 Display position in percent.
Vec2 ScriptDisplaySprite::GetPosition() const
{
@ -122,7 +122,7 @@ namespace TEN::Scripting::DisplaySprite
}
/// Get the rotation of the display sprite in degrees.
// @function DisplaySprite:GetRotation()
// @function DisplaySprite:GetRotation
// @treturn float Rotation in degrees.
float ScriptDisplaySprite::GetRotation() const
{
@ -130,7 +130,7 @@ namespace TEN::Scripting::DisplaySprite
}
/// Get the horizontal and vertical scale of the display sprite in percent.
// @function DisplaySprite:GetScale()
// @function DisplaySprite:GetScale
// @treturn Vec2 Horizontal and vertical scale in percent.
Vec2 ScriptDisplaySprite::GetScale() const
{
@ -138,7 +138,7 @@ namespace TEN::Scripting::DisplaySprite
}
/// Get the color of the display sprite.
// @function DisplaySprite:GetColor()
// @function DisplaySprite:GetColor
// @treturn Color Color.
ScriptColor ScriptDisplaySprite::GetColor() const
{
@ -146,48 +146,48 @@ namespace TEN::Scripting::DisplaySprite
}
/// Set the sprite sequence object ID used by the display sprite.
// @function DisplaySprite:SetObjectID(Objects.ObjID.SpriteConstants)
// @tparam Objects.ObjID.SpriteConstants New sprite sequence object ID.
// @function DisplaySprite:SetObjectID
// @tparam Objects.ObjID.SpriteConstants objectID New sprite sequence object ID.
void ScriptDisplaySprite::SetObjectID(GAME_OBJECT_ID objectID)
{
_objectID = objectID;
}
/// Set the sprite ID in the sprite sequence object used by the display sprite.
// @function DisplaySprite:SetSpriteID(int)
// @tparam int New sprite ID in the sprite sequence object.
// @function DisplaySprite:SetSpriteID
// @tparam int spriteID New sprite ID in the sprite sequence object.
void ScriptDisplaySprite::SetSpriteID(int spriteID)
{
_spriteID = spriteID;
}
/// Set the display position of the display sprite in percent.
// @function DisplaySprite:SetPosition(Vec2)
// @tparam Vec2 New display position in percent.
// @function DisplaySprite:SetPosition
// @tparam Vec2 position New display position in percent.
void ScriptDisplaySprite::SetPosition(const Vec2& pos)
{
_position = pos;
}
/// Set the rotation of the display sprite in degrees.
// @function DisplaySprite:SetRotation(float)
// @tparam float New rotation in degrees.
// @function DisplaySprite:SetRotation
// @tparam float rotation New rotation in degrees.
void ScriptDisplaySprite::SetRotation(float rot)
{
_rotation = rot;
}
/// Set the horizontal and vertical scale of the display sprite in percent.
// @function DisplaySprite:SetScale(Vec2)
// @tparam float New horizontal and vertical scale in percent.
// @function DisplaySprite:SetScale
// @tparam float scale New horizontal and vertical scale in percent.
void ScriptDisplaySprite::SetScale(const Vec2& scale)
{
_scale = scale;
}
/// Set the color of the display sprite.
// @function DisplaySprite:SetColor(Color)
// @tparam float New color.
// @function DisplaySprite:SetColor
// @tparam Color color New color.
void ScriptDisplaySprite::SetColor(const ScriptColor& color)
{
_color = color;
@ -195,10 +195,10 @@ namespace TEN::Scripting::DisplaySprite
/// Draw the display sprite in display space for the current frame.
// @function DisplaySprite:Draw
// @tparam[opt] int priority Draw priority. Can be thought of as a layer, with higher values having precedence. __Default: 0__
// @tparam[opt] View.AlignMode alignMode Align mode interpreting an offset from the sprite's position. __Default: View.AlignMode.CENTER__
// @tparam[opt] View.ScaleMode scaleMode Scale mode interpreting the display sprite's horizontal and vertical scale. __Default: View.ScaleMode.FIT__
// @tparam[opt] Effects.BlendID blendMode Blend mode. __Default: Effects.BlendID.ALPHABLEND__
// @tparam[opt=0] int priority Draw priority. Can be thought of as a layer, with higher values having precedence.
// @tparam[opt=View.AlignMode.CENTER] View.AlignMode alignMode Align mode interpreting an offset from the sprite's position.
// @tparam[opt=View.ScaleMode.FIT] View.ScaleMode scaleMode Scale mode interpreting the display sprite's horizontal and vertical scale.
// @tparam[opt=Effects.BlendID.ALPHABLEND] Effects.BlendID blendMode Blend mode.
void ScriptDisplaySprite::Draw(sol::optional<int> priority, sol::optional<DisplaySpriteAlignMode> alignMode,
sol::optional<DisplaySpriteScaleMode> scaleMode, sol::optional<BlendMode> blendMode)
{

Some files were not shown because too many files have changed in this diff Show more