mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00

* Update to bug report form * Update bug_report.yaml * Update AUTHORS.md - Tomo (general coding, special FX coding, bug fixing) * Update CHANGELOG.md * Update CHANGELOG.md * Update bug_report.yaml * Add files via upload * Add files via upload * Add ID_DIARY_SPRITES (1384) and DIARY_ENTRY_SPRITES (1385) * Delete Scripts/Engine/Diarymodule.lua * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Delete Scripts/Engine/CustomBar.lua * Add files via upload * Update CustomDiary.lua * Add files via upload * Add files via upload * Add files via upload * Update CustomDiary.lua * Upload * Update CHANGELOG.md * Revisions * Doc revisions * Remove GameVars.Engine everywhere. * Added error warnings by integrating type module * Update bug_report.yaml * Fixed the bug with GameVars resetting each level. * Added .Engine back. * Added missing checks. * Removed nil from textOptions loop * Added full TEN name for printlogs. * LatestChanges * Added section for import. --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
653 lines
25 KiB
HTML
653 lines
25 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<head>
|
|
<title>TombEngine 1.7.2 (Developer) Lua API</title>
|
|
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div> <!-- id="product" -->
|
|
|
|
|
|
<div id="main">
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
<div id="navigation">
|
|
<br/>
|
|
<h1> TombEngine</h1>
|
|
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
</ul>
|
|
|
|
<h2>1 Modules</h2>
|
|
<ul class="nowrap">
|
|
<li> <here>Effects</here></li>
|
|
<li> <a href="../1 modules/Flow.html">Flow</a></li>
|
|
<li> <a href="../1 modules/Input.html">Input</a></li>
|
|
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
|
|
<li> <a href="../1 modules/Logic.html">Logic</a></li>
|
|
<li> <a href="../1 modules/Objects.html">Objects</a></li>
|
|
<li> <a href="../1 modules/Sound.html">Sound</a></li>
|
|
<li> <a href="../1 modules/Strings.html">Strings</a></li>
|
|
<li> <a href="../1 modules/Util.html">Util</a></li>
|
|
<li> <a href="../1 modules/View.html">View</a></li>
|
|
</ul>
|
|
<h2>2 Classes</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
|
|
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
|
|
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
|
|
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
|
|
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
|
|
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
|
|
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
|
|
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
|
|
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
|
|
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
|
|
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
|
|
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
|
|
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
|
|
<li> <a href="../2 classes/View.DisplaySprite.html">View.DisplaySprite</a></li>
|
|
</ul>
|
|
<h2>3 Primitive Classes</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../3 primitive classes/Flow.Fog.html">Flow.Fog</a></li>
|
|
<li> <a href="../3 primitive classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
|
|
<li> <a href="../3 primitive classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
|
|
<li> <a href="../3 primitive classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
|
|
<li> <a href="../3 primitive classes/Flow.Starfield.html">Flow.Starfield</a></li>
|
|
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
|
|
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
|
|
<li> <a href="../3 primitive classes/Time.html">Time</a></li>
|
|
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
|
|
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
|
|
</ul>
|
|
<h2>4 Enums</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
|
|
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
|
|
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>
|
|
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
|
|
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
|
|
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
|
|
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
|
|
<li> <a href="../4 enums/Objects.HandStatus.html">Objects.HandStatus</a></li>
|
|
<li> <a href="../4 enums/Objects.WeaponType.html">Objects.WeaponType</a></li>
|
|
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
|
|
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
|
|
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
|
|
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
|
|
<li> <a href="../4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></li>
|
|
<li> <a href="../4 enums/Strings.DisplayStringOption.html">Strings.DisplayStringOption</a></li>
|
|
<li> <a href="../4 enums/Util.LogLevel.html">Util.LogLevel</a></li>
|
|
<li> <a href="../4 enums/View.AlignMode.html">View.AlignMode</a></li>
|
|
<li> <a href="../4 enums/View.CameraType.html">View.CameraType</a></li>
|
|
<li> <a href="../4 enums/View.PostProcessMode.html">View.PostProcessMode</a></li>
|
|
<li> <a href="../4 enums/View.ScaleMode.html">View.ScaleMode</a></li>
|
|
</ul>
|
|
<h2>5 Lua utility modules</h2>
|
|
<ul class="nowrap">
|
|
<li> <a href="../5 lua utility modules/Diary.html">Diary</a></li>
|
|
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
|
|
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
|
|
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Table <code>Effects</code></h1>
|
|
<p>Functions to generate effects.</p>
|
|
<p>
|
|
|
|
</p>
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" ><a href="#EmitLightningArc">EmitLightningArc(src, dest, color, lifetime, 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, applyDamage, applyPoison, spriteSeqID, startRot)</a></td>
|
|
<td class="summary">Emit a particle.</td>
|
|
</tr>
|
|
<tr>
|
|
<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>
|
|
<td class="name" ><a href="#EmitLight">EmitLight(pos[, color][, radius][, shadows][, name])</a></td>
|
|
<td class="summary">Emit dynamic light that lasts for a single frame.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#EmitSpotLight">EmitSpotLight(pos, dir[, color][, radius][, falloff][, distance][, shadows][, name])</a></td>
|
|
<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="summary">Emit blood.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#EmitAirBubble">EmitAirBubble(pos[, size][, amp])</a></td>
|
|
<td class="summary">Emit air bubble in a water room.</td>
|
|
</tr>
|
|
<tr>
|
|
<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="summary">Make an explosion.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#MakeEarthquake">MakeEarthquake(strength)</a></td>
|
|
<td class="summary">Make an earthquake</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" ><a href="#GetWind">GetWind()</a></td>
|
|
<td class="summary">Get the wind vector for the current game frame.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "EmitLightningArc"></a>
|
|
<strong>EmitLightningArc(src, dest, color, lifetime, amplitude, beamWidth, detail, smooth, endDrift)</strong>
|
|
</dt>
|
|
<dd>
|
|
Emit a lightning arc.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">src</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
|
|
|
|
|
|
</li>
|
|
<li><span class="parameter">dest</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
|
|
|
|
|
|
</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))
|
|
</li>
|
|
<li><span class="parameter">lifetime</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. (default 1.0)
|
|
</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]. (default 20)
|
|
</li>
|
|
<li><span class="parameter">beamWidth</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
Clamped to [1, 127]. (default 2)
|
|
</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]. (default 10)
|
|
</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. (default false)
|
|
</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 (default false)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "EmitParticle"></a>
|
|
<strong>EmitParticle(pos, vel, spriteID, gravity, rotVel, startColor, endColor, blendMode, startSize, endSize, life, applyDamage, applyPoison, spriteSeqID, startRot)</strong>
|
|
</dt>
|
|
<dd>
|
|
Emit a particle.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">pos</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
World position.
|
|
</li>
|
|
<li><span class="parameter">vel</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
Velocity.
|
|
</li>
|
|
<li><span class="parameter">spriteID</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
ID of the sprite in the sprite sequence object.
|
|
</li>
|
|
<li><span class="parameter">gravity</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
Specifies if the particle will fall over time. Positive values ascend, negative values descend. Recommended range: [-1000 and 1000]. <strong>Default: 0</strong>
|
|
</li>
|
|
<li><span class="parameter">rotVel</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
Rotational velocity in degrees. <strong>Default: 0</strong>
|
|
</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>
|
|
</li>
|
|
<li><span class="parameter">endColor</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
|
|
Color to fade toward. This will finish long before the end of the particle's life due to internal math. <strong>Default: Color(255, 255, 255)</strong>
|
|
</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.ALPHABLEND</strong>
|
|
</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>
|
|
</li>
|
|
<li><span class="parameter">endSize</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
Size at end of life. The particle will linearly shrink or grow toward this size over its lifespan. <strong>Default: 0</strong>
|
|
</li>
|
|
<li><span class="parameter">life</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
Lifespan in seconds. <strong>Default: 2</strong>
|
|
</li>
|
|
<li><span class="parameter">applyDamage</span>
|
|
<span class="types"><span class="type">bool</span></span>
|
|
Specify if the particle will harm the player on collision. <strong>Default: false</strong>
|
|
</li>
|
|
<li><span class="parameter">applyPoison</span>
|
|
<span class="types"><span class="type">bool</span></span>
|
|
Specify if the particle will poison the player on collision. <strong>Default: false</strong>
|
|
</li>
|
|
<li><span class="parameter">spriteSeqID</span>
|
|
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#">ObjID</a></span>
|
|
ID of the sprite sequence object. <strong>Default: Objects.ObjID.DEFAULT_SPRITES</strong>
|
|
</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>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">EmitParticle(
|
|
pos,
|
|
Vec3(<span class="global">math</span>.random(), <span class="global">math</span>.random(), <span class="global">math</span>.random()),
|
|
<span class="number">22</span>, <span class="comment">-- spriteID
|
|
</span> <span class="number">0</span>, <span class="comment">-- gravity
|
|
</span> -<span class="number">2</span>, <span class="comment">-- rotVel
|
|
</span> Color(<span class="number">255</span>, <span class="number">0</span>, <span class="number">0</span>), <span class="comment">-- startColor
|
|
</span> Color(<span class="number">0</span>, <span class="number">255</span>, <span class="number">0</span>), <span class="comment">-- endColor
|
|
</span> TEN.Effects.BlendID.ADDITIVE, <span class="comment">-- blendMode
|
|
</span> <span class="number">15</span>, <span class="comment">-- startSize
|
|
</span> <span class="number">50</span>, <span class="comment">-- endSize
|
|
</span> <span class="number">20</span>, <span class="comment">-- life
|
|
</span> <span class="keyword">false</span>, <span class="comment">-- applyDamage
|
|
</span> <span class="keyword">true</span>, <span class="comment">-- applyPoison
|
|
</span> Objects.ObjID.DEFAULT_SPRITES, <span class="comment">-- spriteSeqID
|
|
</span> <span class="number">180</span> <span class="comment">-- startRot
|
|
</span> )</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "EmitShockwave"></a>
|
|
<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.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">pos</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
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
|
|
</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
|
|
</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))
|
|
</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)
|
|
</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)
|
|
</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
|
|
</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
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "EmitLight"></a>
|
|
<strong>EmitLight(pos[, color][, radius][, shadows][, name])</strong>
|
|
</dt>
|
|
<dd>
|
|
Emit dynamic light that lasts for a single frame.
|
|
If you want a light that sticks around, you must call this each frame.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">pos</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
position of the light
|
|
</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>)
|
|
</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>)
|
|
</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>)
|
|
</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)
|
|
(<em>optional</em>)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "EmitSpotLight"></a>
|
|
<strong>EmitSpotLight(pos, dir[, color][, radius][, falloff][, distance][, shadows][, name])</strong>
|
|
</dt>
|
|
<dd>
|
|
Emit dynamic directional spotlight that lasts for a single frame.
|
|
If you want a light that sticks around, you must call this each frame.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">pos</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
position of the light
|
|
</li>
|
|
<li><span class="parameter">dir</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
direction, or a point to which spotlight should be directed to
|
|
</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>)
|
|
</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>)
|
|
</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>)
|
|
</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>)
|
|
</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>)
|
|
</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)
|
|
(<em>optional</em>)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "EmitBlood"></a>
|
|
<strong>EmitBlood(pos, count)</strong>
|
|
</dt>
|
|
<dd>
|
|
Emit blood.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">pos</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
|
|
|
|
|
|
</li>
|
|
<li><span class="parameter">count</span>
|
|
<span class="types"><span class="type">int</span></span>
|
|
(default 1) "amount" of blood. Higher numbers won't add more blood but will make it more "flickery", with higher numbers turning it into a kind of red orb.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "EmitAirBubble"></a>
|
|
<strong>EmitAirBubble(pos[, size][, amp])</strong>
|
|
</dt>
|
|
<dd>
|
|
Emit air bubble in a water room.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">pos</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
World position where the effect will be spawned. Must be in a water room.
|
|
</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>)
|
|
</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>)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "EmitFire"></a>
|
|
<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.
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">pos</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
|
|
|
|
|
|
</li>
|
|
<li><span class="parameter">size</span>
|
|
<span class="types"><span class="type">float</span></span>
|
|
(default 1.0)
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "MakeExplosion"></a>
|
|
<strong>MakeExplosion(pos, size, shockwave)</strong>
|
|
</dt>
|
|
<dd>
|
|
Make an explosion. Does not hurt Lara
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">pos</span>
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
|
|
|
|
|
|
</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
|
|
</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
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "MakeEarthquake"></a>
|
|
<strong>MakeEarthquake(strength)</strong>
|
|
</dt>
|
|
<dd>
|
|
Make an earthquake
|
|
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<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.
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "GetWind"></a>
|
|
<strong>GetWind()</strong>
|
|
</dt>
|
|
<dd>
|
|
Get the wind vector for the current game frame.
|
|
This represents the 3D displacement applied by the engine on things like particles affected by wind.()
|
|
|
|
|
|
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
|
|
Wind vector.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
</div> <!-- id="main" -->
|
|
<div id="about">
|
|
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|