TombEngine/Documentation/doc/1 modules/Effects.html

654 lines
25 KiB
HTML
Raw Normal View History

<!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/>
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<h1>&nbsp;TombEngine</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>1 Modules</h2>
<ul class="nowrap">
2022-12-09 22:08:16 +00:00
<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>
2022-12-09 22:08:16 +00:00
<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>
2022-12-09 22:08:16 +00:00
<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">
2022-12-09 22:08:16 +00:00
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
2024-12-15 23:59:31 +01:00
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
2022-12-09 22:08:16 +00:00
<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>
2022-12-30 16:33:26 +00:00
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
2022-12-09 22:08:16 +00:00
<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>
2022-12-16 18:36:42 +00:00
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
2022-12-09 22:08:16 +00:00
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<li> <a href="../2 classes/View.DisplaySprite.html">View.DisplaySprite</a></li>
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<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>
2022-12-09 22:08:16 +00:00
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<li> <a href="../3 primitive classes/Time.html">Time</a></li>
2023-05-31 21:48:00 +01:00
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
2022-12-09 22:08:16 +00:00
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
2022-12-09 22:08:16 +00:00
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
Customize global hardcoded parameters (#1495) * Initial commit * Update CHANGELOG.md * Tint flare smoke * Expose GetCustomizations * Added lensflare and flicker customization options for flare * Update LensFlare.cpp * Remove unnecessary code * Update lara_flare.cpp * Massive refactor to merge animations, settings and customizations * Add HUD customization options * Customize weapons * Fixed flare, renamed recoil to interval, fixed lensflare default * Occlude flare lensflares * Update Settings.cpp * Use alternate damage for lasersight mode * Added hair cust * Fix comment * Fix another comment * Fix link * Fix placeholder table names * Reorganize types * Add missing initializers for hair settings * Added physics cust * Clarify description * Update settings.lua * Update CHANGELOG.md * Add gun smoke, gun shells and ammo pickup counts * Fix naming ambiguity * Remove missing features from documentation * Fix comment * Fix parameter name, change default settings file * Fixed pitch black * Rollback DoDistanceFogForVertex * Add camera cust * Change binocular/lasersight toggle to color * Update lara_basic.cpp * Add time and statistics classes and script API for it * Fix comment * Use DoDamage on Lara helpers to register with statistics * Update Time.cpp * Fix documentation * Fix default flare timeout * Update Settings.lua * Add flare muzzle offset customization * Remove young Lara limitations * Fix lasersight color * Push full settings.lua * Update RendererCompatibility.cpp * Allow to customize root meshes, decopypaste hair and joint init code * Added sol Time operator overloads * Some changes to docs, add meaningful error for unknown fields * Use existing new index template, add gunflash color settings, add shotgun muzzle * Remove excessive usage of GetSettings() * Cleanups * Update Settings.lua * Clarify parameter name * Fix InitializeWeaponInfo * PR review code tidying * Fix bad merge * Update FlowHandler.cpp * Remove tabs for LDoc comments * Use different comment style to preserve formatting * Update lara_fire.cpp * Some cleanups * Fixed GetTimeUnits * Fix typo * Update Time.cpp --------- Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 19:24:49 +03:00
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>
Freeze event and OnUseItem callbacks (#1463) * Add use item callbacks, add menu boilerplate code * Set up scripting API for game mode * Use word "break" instead of "menu" everywhere * Rudimentary implementation of BreakPhase * More progress * Doc update * Always active lensflare * Update CHANGELOG.md * Fix hair interpolation for spectator mode * Update target highlighter and other HUD elements while in break mode * Fix various problems * Don't try to update camera in spectator mode * Cleanup camera code * Rename break to freeze * Update FlowHandler.cpp * Update Flow.html * Update control.cpp * Rename method * Add displaystring owner to differentiate between freeze modes * Disable triggers and volumes in freeze mode * Update control.cpp * Rename enum * Update CHANGELOG.md * Implement full freeze, correct callback behaviour * Update RendererDrawMenu.cpp * Allow DumpGameScene to do partial pass * Remove hack * Introduce render mode enum to render scene without any postprocess * Tidying * Fix problems with items or renderer not updating before entering freeze mode * Fix rebase errors * Use interpolation factor getter instead of raw value everywhere * Update documentation * Fixed setting freeze mode from OnStart * Fixed freeze mode not working in OnStart event * Revert "Fixed freeze mode not working in OnStart event" This reverts commit 87f6fbdc6d776bb7813133a84c8ba9d0b1171f3b. * Bypass cinematic bars and fades for non-full render modes --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 23:54:39 +03:00
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
2023-12-26 20:47:08 +00:00
<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>
2023-12-26 20:47:08 +00:00
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
2022-12-09 22:08:16 +00:00
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
2022-12-30 16:33:26 +00:00
<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>
2024-11-16 22:07:57 +11:00
<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>
2022-12-09 22:08:16 +00:00
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
2024-12-16 21:33:37 +01:00
<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>
2022-07-31 20:39:07 +01:00
<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>
2022-07-31 20:39:07 +01:00
<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>
2022-07-31 20:39:07 +01:00
<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>
2022-07-31 20:39:07 +01:00
<td class="name" ><a href="#EmitBlood">EmitBlood(pos, count)</a></td>
<td class="summary">Emit blood.</td>
</tr>
<tr>
2025-02-06 02:35:16 +11:00
<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>
2022-07-31 20:39:07 +01:00
<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>
Freeze event and OnUseItem callbacks (#1463) * Add use item callbacks, add menu boilerplate code * Set up scripting API for game mode * Use word "break" instead of "menu" everywhere * Rudimentary implementation of BreakPhase * More progress * Doc update * Always active lensflare * Update CHANGELOG.md * Fix hair interpolation for spectator mode * Update target highlighter and other HUD elements while in break mode * Fix various problems * Don't try to update camera in spectator mode * Cleanup camera code * Rename break to freeze * Update FlowHandler.cpp * Update Flow.html * Update control.cpp * Rename method * Add displaystring owner to differentiate between freeze modes * Disable triggers and volumes in freeze mode * Update control.cpp * Rename enum * Update CHANGELOG.md * Implement full freeze, correct callback behaviour * Update RendererDrawMenu.cpp * Allow DumpGameScene to do partial pass * Remove hack * Introduce render mode enum to render scene without any postprocess * Tidying * Fix problems with items or renderer not updating before entering freeze mode * Fix rebase errors * Use interpolation factor getter instead of raw value everywhere * Update documentation * Fixed setting freeze mode from OnStart * Fixed freeze mode not working in OnStart event * Revert "Fixed freeze mode not working in OnStart event" This reverts commit 87f6fbdc6d776bb7813133a84c8ba9d0b1171f3b. * Bypass cinematic bars and fades for non-full render modes --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 23:54:39 +03:00
<td class="summary">Get the wind vector for the current game frame.</td>
</tr>
2022-07-31 20:39:07 +01:00
</table>
<br/>
<br/>
2022-07-31 20:39:07 +01:00
<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.
2022-12-09 22:08:16 +00:00
2022-07-31 20:39:07 +01:00
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">src</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">dest</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">color</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
2022-07-31 20:39:07 +01:00
(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>
2022-07-31 20:39:07 +01:00
</dt>
<dd>
Emit a particle.
2022-07-31 20:39:07 +01:00
2022-12-09 22:08:16 +00:00
2022-07-31 20:39:07 +01:00
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pos</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
World position.
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">vel</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Velocity.
2022-07-31 20:39:07 +01:00
</li>
Waterfall_Emitter (#1359) * waterfall emitter. warning for the test I changed waterfallmist object * test * update * update * update * formatting * formatting * formatting * update mist color * import develop * bugfix sprite * added mor sprite particles * waterfall intensity * update waterfall to be more filled * update * Create a new sprite sequence for waterfall * Fixed texture order * removed GetParticleDistanceFade() from waterfall * Order * Update Particle struct; update waterfall * Update Particle struct * Simplify waterfall emitter * Simplify waterfall emitter * Simplify waterfall emitter * Simplify * Fix waterfall density; move sprite slot * Update Waterfall.cpp * fixed some small bugs with the waterfall after simplify * commit * imported develop 60fps branch * fixed waterfall errors * update * commit * update/test * update Waterfall * fixed last bugs * formatting * added option for sound * update * update, fixing errors * update * formatting * Formatting * fixed color issue, now only savegame is left * formatting * added new fields to savegame * targetpos is now Vector3 * import develop * Fixes according to GH notes + move waterfall-specific code out of effects.cpp * Rollback object ID rename, add missing enum * renamed ID_WATERFALL_ into ID_WATERFALL_SPRITES * fixed SpriteSeqID for spark in spark.cpp * Update CHANGELOG.md * rewritten waterfall code * Update waterfall impact point --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com> Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2025-01-10 23:27:48 +01:00
<li><span class="parameter">spriteID</span>
2022-07-31 20:39:07 +01:00
<span class="types"><span class="type">int</span></span>
ID of the sprite in the sprite sequence object.
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">gravity</span>
<span class="types"><span class="type">float</span></span>
2025-02-06 02:35:16 +11:00
Specifies if the particle will fall over time. Positive values ascend, negative values descend. Recommended range: [-1000 and 1000]. <strong>Default: 0</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">rotVel</span>
2022-07-31 20:39:07 +01:00
<span class="types"><span class="type">float</span></span>
2025-02-06 02:35:16 +11:00
Rotational velocity in degrees. <strong>Default: 0</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">startColor</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
2025-02-06 02:35:16 +11:00
Color at start of life. <strong>Default: Color(255, 255, 255)</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">endColor</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
2025-02-06 02:35:16 +11:00
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>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">blendMode</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
2025-02-06 02:35:16 +11:00
Render blend mode. <strong>TEN.Effects.BlendID.ALPHABLEND</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">startSize</span>
<span class="types"><span class="type">float</span></span>
2025-02-06 02:35:16 +11:00
Size at start of life. <strong>Default: 10</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">endSize</span>
<span class="types"><span class="type">float</span></span>
2025-02-06 02:35:16 +11:00
Size at end of life. The particle will linearly shrink or grow toward this size over its lifespan. <strong>Default: 0</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">life</span>
2022-07-31 20:39:07 +01:00
<span class="types"><span class="type">float</span></span>
2025-02-06 02:35:16 +11:00
Lifespan in seconds. <strong>Default: 2</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">applyDamage</span>
2022-07-31 20:39:07 +01:00
<span class="types"><span class="type">bool</span></span>
2025-02-06 02:35:16 +11:00
Specify if the particle will harm the player on collision. <strong>Default: false</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">applyPoison</span>
2022-07-31 20:39:07 +01:00
<span class="types"><span class="type">bool</span></span>
2025-02-06 02:35:16 +11:00
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>
2025-02-06 02:35:16 +11:00
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>
2025-02-06 02:35:16 +11:00
Rotation at start of life. <strong>Default: random</strong>
2022-07-31 20:39:07 +01:00
</li>
</ul>
<h3>Usage:</h3>
<ul>
<pre class="example">EmitParticle(
pos,
2022-07-31 20:39:07 +01:00
Vec3(<span class="global">math</span>.random(), <span class="global">math</span>.random(), <span class="global">math</span>.random()),
Waterfall_Emitter (#1359) * waterfall emitter. warning for the test I changed waterfallmist object * test * update * update * update * formatting * formatting * formatting * update mist color * import develop * bugfix sprite * added mor sprite particles * waterfall intensity * update waterfall to be more filled * update * Create a new sprite sequence for waterfall * Fixed texture order * removed GetParticleDistanceFade() from waterfall * Order * Update Particle struct; update waterfall * Update Particle struct * Simplify waterfall emitter * Simplify waterfall emitter * Simplify waterfall emitter * Simplify * Fix waterfall density; move sprite slot * Update Waterfall.cpp * fixed some small bugs with the waterfall after simplify * commit * imported develop 60fps branch * fixed waterfall errors * update * commit * update/test * update Waterfall * fixed last bugs * formatting * added option for sound * update * update, fixing errors * update * formatting * Formatting * fixed color issue, now only savegame is left * formatting * added new fields to savegame * targetpos is now Vector3 * import develop * Fixes according to GH notes + move waterfall-specific code out of effects.cpp * Rollback object ID rename, add missing enum * renamed ID_WATERFALL_ into ID_WATERFALL_SPRITES * fixed SpriteSeqID for spark in spark.cpp * Update CHANGELOG.md * rewritten waterfall code * Update waterfall impact point --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com> Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2025-01-10 23:27:48 +01:00
<span class="number">22</span>, <span class="comment">-- spriteID
2022-07-31 20:39:07 +01:00
</span> <span class="number">0</span>, <span class="comment">-- gravity
</span> -<span class="number">2</span>, <span class="comment">-- rotVel
2022-07-31 20:39:07 +01:00
</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
2022-07-31 20:39:07 +01:00
</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>
2022-07-31 20:39:07 +01:00
</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.
2022-12-09 22:08:16 +00:00
2022-07-31 20:39:07 +01:00
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pos</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
2022-07-31 20:39:07 +01:00
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>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
2022-07-31 20:39:07 +01:00
(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>
2022-07-31 20:39:07 +01:00
</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.
2022-12-09 22:08:16 +00:00
2022-07-31 20:39:07 +01:00
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pos</span>
2022-12-11 18:40:31 +00:00
<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.
2022-07-31 20:39:07 +01:00
<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
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">color</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
2022-07-31 20:39:07 +01:00
(default Color(255, 255, 255))
(<em>optional</em>)
2022-07-31 20:39:07 +01:00
</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>)
2022-07-31 20:39:07 +01:00
</li>
</ul>
</dd>
<dt>
<a name = "EmitBlood"></a>
<strong>EmitBlood(pos, count)</strong>
</dt>
<dd>
Emit blood.
2022-12-09 22:08:16 +00:00
2022-07-31 20:39:07 +01:00
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pos</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
2022-07-31 20:39:07 +01:00
</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>
2025-02-06 02:35:16 +11:00
<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>
2025-02-06 02:35:16 +11:00
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>
2025-02-06 02:35:16 +11:00
Sprite size. <strong>Default: 32</strong>
(<em>optional</em>)
</li>
2025-02-06 02:35:16 +11:00
<li><span class="parameter">amp</span>
<span class="types"><span class="type">float</span></span>
2025-02-06 02:35:16 +11:00
Oscillation amplitude. <strong>Default: 32</strong>
(<em>optional</em>)
</li>
</ul>
2022-07-31 20:39:07 +01:00
</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.
2022-07-31 20:39:07 +01:00
2022-12-09 22:08:16 +00:00
2022-07-31 20:39:07 +01:00
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pos</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
2022-07-31 20:39:07 +01:00
</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
2022-12-09 22:08:16 +00:00
2022-07-31 20:39:07 +01:00
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pos</span>
2022-12-11 18:40:31 +00:00
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
2022-07-31 20:39:07 +01:00
</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
2022-12-09 22:08:16 +00:00
2022-07-31 20:39:07 +01:00
<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>
Freeze event and OnUseItem callbacks (#1463) * Add use item callbacks, add menu boilerplate code * Set up scripting API for game mode * Use word "break" instead of "menu" everywhere * Rudimentary implementation of BreakPhase * More progress * Doc update * Always active lensflare * Update CHANGELOG.md * Fix hair interpolation for spectator mode * Update target highlighter and other HUD elements while in break mode * Fix various problems * Don't try to update camera in spectator mode * Cleanup camera code * Rename break to freeze * Update FlowHandler.cpp * Update Flow.html * Update control.cpp * Rename method * Add displaystring owner to differentiate between freeze modes * Disable triggers and volumes in freeze mode * Update control.cpp * Rename enum * Update CHANGELOG.md * Implement full freeze, correct callback behaviour * Update RendererDrawMenu.cpp * Allow DumpGameScene to do partial pass * Remove hack * Introduce render mode enum to render scene without any postprocess * Tidying * Fix problems with items or renderer not updating before entering freeze mode * Fix rebase errors * Use interpolation factor getter instead of raw value everywhere * Update documentation * Fixed setting freeze mode from OnStart * Fixed freeze mode not working in OnStart event * Revert "Fixed freeze mode not working in OnStart event" This reverts commit 87f6fbdc6d776bb7813133a84c8ba9d0b1171f3b. * Bypass cinematic bars and fades for non-full render modes --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 23:54:39 +03:00
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>
Freeze event and OnUseItem callbacks (#1463) * Add use item callbacks, add menu boilerplate code * Set up scripting API for game mode * Use word "break" instead of "menu" everywhere * Rudimentary implementation of BreakPhase * More progress * Doc update * Always active lensflare * Update CHANGELOG.md * Fix hair interpolation for spectator mode * Update target highlighter and other HUD elements while in break mode * Fix various problems * Don't try to update camera in spectator mode * Cleanup camera code * Rename break to freeze * Update FlowHandler.cpp * Update Flow.html * Update control.cpp * Rename method * Add displaystring owner to differentiate between freeze modes * Disable triggers and volumes in freeze mode * Update control.cpp * Rename enum * Update CHANGELOG.md * Implement full freeze, correct callback behaviour * Update RendererDrawMenu.cpp * Allow DumpGameScene to do partial pass * Remove hack * Introduce render mode enum to render scene without any postprocess * Tidying * Fix problems with items or renderer not updating before entering freeze mode * Fix rebase errors * Use interpolation factor getter instead of raw value everywhere * Update documentation * Fixed setting freeze mode from OnStart * Fixed freeze mode not working in OnStart event * Revert "Fixed freeze mode not working in OnStart event" This reverts commit 87f6fbdc6d776bb7813133a84c8ba9d0b1171f3b. * Bypass cinematic bars and fades for non-full render modes --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 23:54:39 +03:00
Wind vector.
</ol>
2022-07-31 20:39:07 +01:00
</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>