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

974 lines
39 KiB
HTML
Raw Permalink 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>
2025-03-28 23:39:49 +01:00
<title>TombEngine 1.8.1 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
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">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
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.Horizon.html">Flow.Horizon</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/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>
2025-03-15 01:01:05 +01:00
<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">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
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>
<li> <a href="../4 enums/Effects.StreamerFeatherMode.html">Effects.StreamerFeatherMode</a></li>
<li> <a href="../4 enums/Effects.ParticleAnimationType.html">Effects.ParticleAnimationType</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/CustomBar.html">CustomBar</a></li>
<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>
2025-03-15 18:01:27 +11:00
<td class="name" ><a href="#EmitLightningArc">EmitLightningArc(origin, target, color, life, amplitude, beamWidth, detail, smooth, endDrift)</a></td>
2022-07-31 20:39:07 +01:00
<td class="summary">Emit a lightning arc.</td>
</tr>
<tr>
2025-03-15 18:01:27 +11:00
<td class="name" ><a href="#EmitParticle">EmitParticle(pos, vel, spriteID, gravity, rotVel, startColor, endColor, blendMode, startSize, endSize, life, damage, poison, 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="#EmitAdvancedParticle">EmitAdvancedParticle(ParticleData)</a></td>
2025-03-15 18:01:27 +11:00
<td class="summary">Emit a particle with extensive configuration options, including sprite sequence animation, lights, sounds, and damage effects.</td>
</tr>
<tr>
2022-07-31 20:39:07 +01:00
<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 an 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>
2025-03-09 20:01:43 +01:00
<tr>
<td class="name" ><a href="#EmitStreamer">EmitStreamer(mov, tag, pos, dir[, rot][, startColor][, endColor][, width][, life][, vel][, expRate][, rotRate][, edgeFeatherMode][, lengthFeatherMode][, blendID])</a></td>
<td class="summary">Emit an extending streamer effect.</td>
</tr>
2022-07-31 20:39:07 +01:00
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#ParticleData">ParticleData</a></td>
<td class="summary">Structure for EmitAdvancedParticle table.</td>
</tr>
</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>
2025-03-15 18:01:27 +11:00
<strong>EmitLightningArc(origin, target, color, life, amplitude, beamWidth, detail, smooth, endDrift)</strong>
2022-07-31 20:39:07 +01:00
</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>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">origin</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>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">target</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>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">life</span>
2022-07-31 20:39:07 +01:00
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Lifetime in seconds. Clamped to [0, 4.233] for now because of strange internal maths. <strong>default: 1</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">amplitude</span>
<span class="types"><span class="type">int</span></span>
2025-03-15 18:01:27 +11:00
"strength" of the lightning - the higher the value, the "taller" the arcs. Clamped to [1, 255]. <strong>default: 20</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">beamWidth</span>
<span class="types"><span class="type">int</span></span>
2025-03-15 18:01:27 +11:00
Clamped to [1, 127]. <strong>default 2</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">detail</span>
<span class="types"><span class="type">int</span></span>
2025-03-15 18:01:27 +11:00
Higher numbers equal more segments, but it's not a 1:1 correlation. Clamped to [1, 127]. <strong>default: 10</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">smooth</span>
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
If true, the arc will have large, smooth curves; if false, it will have small, jagged spikes. <strong>default: false</strong>
2022-07-31 20:39:07 +01:00
</li>
<li><span class="parameter">endDrift</span>
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
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>
2022-07-31 20:39:07 +01:00
</li>
</ul>
</dd>
<dt>
<a name = "EmitParticle"></a>
2025-03-15 18:01:27 +11:00
<strong>EmitParticle(pos, vel, spriteID, gravity, rotVel, startColor, endColor, blendMode, startSize, endSize, life, damage, poison, 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>
2025-03-15 18:01:27 +11:00
Directional 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>
2025-03-15 18:01:27 +11:00
Sprite ID in the sprite sequence slot.
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-03-15 18:01:27 +11:00
Effect of gravity. Positive value ascends, negative value descends. <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-03-15 18:01:27 +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-03-15 18:01:27 +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-03-15 18:01:27 +11:00
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>
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-03-15 18:01:27 +11:00
Render blend mode. <strong>TEN.Effects.BlendID.ALPHA_BLEND</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-03-15 18:01:27 +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-03-15 18:01:27 +11:00
Size at end of life. <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-03-15 18:01:27 +11:00
Lifespan in seconds. <strong>default: 2</strong>
2022-07-31 20:39:07 +01:00
</li>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">damage</span>
2022-07-31 20:39:07 +01:00
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
Harm the player on collision. <strong>default: false</strong>
2022-07-31 20:39:07 +01:00
</li>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">poison</span>
2022-07-31 20:39:07 +01:00
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
Poison the player on collision. <strong>default: false</strong>
</li>
<li><span class="parameter">spriteSeqID</span>
2025-03-11 23:46:31 +01:00
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
2025-03-15 18:01:27 +11:00
Sprite sequence slot ID. <strong>default: Objects.ObjID.DEFAULT_SPRITES</strong>
</li>
<li><span class="parameter">startRot</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +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(
2025-03-15 18:01:27 +11:00
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">-- damage
</span> <span class="keyword">true</span>, <span class="comment">-- poison
</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 = "EmitAdvancedParticle"></a>
<strong>EmitAdvancedParticle(ParticleData)</strong>
</dt>
<dd>
2025-03-15 18:01:27 +11:00
Emit a particle with extensive configuration options, including sprite sequence animation, lights, sounds, and damage effects.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">ParticleData</span>
<span class="types"><a class="type" href="../1 modules/Effects.html#ParticleData">ParticleData</a></span>
2025-03-15 18:01:27 +11:00
Table containing particle data.
</li>
</ul>
<h3>Usage:</h3>
<ul>
2025-03-15 18:01:27 +11:00
<pre class="example"><span class="keyword">local</span> particle =
{
pos = GetMoveableByName(<span class="string">"camera_target_6"</span>):GetPosition(),
vel = Vec3(<span class="number">0</span>, <span class="number">0</span>, <span class="number">10</span>),
spriteSeqID = TEN.Objects.ObjID.CUSTOM_BAR_GRAPHIC,
spriteID = <span class="number">0</span>,
life = <span class="number">10</span>,
maxYVel = <span class="number">0</span>,
gravity = <span class="number">0</span>,
friction = <span class="number">10</span>,
startRot = <span class="number">0</span>,
rotVel = <span class="number">0</span>,
startSize = <span class="number">80</span>,
endSize = <span class="number">80</span>,
startColor = TEN.Color(<span class="number">128</span>, <span class="number">128</span>, <span class="number">128</span>),
endColor = TEN.Color(<span class="number">128</span>, <span class="number">128</span>, <span class="number">128</span>),
blendMode = TEN.Effects.BlendID.ADDITIVE,
wind = <span class="keyword">false</span>,
damage = <span class="keyword">true</span>,
poison = <span class="keyword">false</span>,
burn = <span class="keyword">false</span>,
damageHit = <span class="number">80</span>,
soundID = <span class="number">197</span>,
2025-03-15 18:01:27 +11:00
light = <span class="keyword">true</span>,
lightRadius = <span class="number">6</span>,
lightFlicker = <span class="number">5</span>,
animated = <span class="keyword">true</span>,
frameRate = <span class="number">0.25</span>,
animType = TEN.Effects.ParticleAnimationType.LOOP,
}
EmitAdvancedParticle(particle)</pre>
</ul>
2022-07-31 20:39:07 +01:00
</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>
2025-02-23 21:59:44 +11:00
normal which indicates light direction
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>
Sprite count. <strong>default: 1</strong>
2022-07-31 20:39:07 +01:00
</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 an 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>
2025-03-15 18:01:27 +11:00
Fire size. <strong>default: 1</strong>
2022-07-31 20:39:07 +01:00
</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>
2025-03-09 20:01:43 +01:00
</dd>
<dt>
<a name = "EmitStreamer"></a>
<strong>EmitStreamer(mov, tag, pos, dir[, rot][, startColor][, endColor][, width][, life][, vel][, expRate][, rotRate][, edgeFeatherMode][, lengthFeatherMode][, blendID])</strong>
</dt>
<dd>
Emit an extending streamer effect.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">mov</span>
<span class="types"><span class="type">Moveable</span></span>
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>
</li>
<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">dir</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Direction vector of movement velocity.
</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>)
</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>)
</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>)
</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>)
</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>)
</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>)
</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>)
</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>)
</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>
2025-03-09 20:01:43 +01:00
(<em>optional</em>)
</li>
<li><span class="parameter">lengthFeatherMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.StreamerFeatherMode.html#">StreamerFeatherMode</a></span>
2025-03-15 18:01:27 +11:00
Length feather mode. <strong>UNIMPLEMENTED, currently will always leave a fading tail</strong>
2025-03-09 20:01:43 +01:00
(<em>optional</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>)
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "ParticleData"></a>
<strong>ParticleData</strong>
</dt>
<dd>
Structure for EmitAdvancedParticle table.
<h3>Fields:</h3>
<ul>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
World position.
</li>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">vel</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
2025-03-15 18:01:27 +11:00
Directional velocity in world units per second.
</li>
<li><span class="parameter">spriteSeqID</span>
2025-03-11 23:46:31 +01:00
<span class="types"><a class="type" href="../4 enums/Objects.ObjID.html#SpriteConstants">SpriteConstants</a></span>
2025-03-15 18:01:27 +11:00
Sprite sequence slot ID. <strong>default: Objects.ObjID.DEFAULT_SPRITES</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">spriteID</span>
<span class="types"><span class="type">int</span></span>
2025-03-15 18:01:27 +11:00
Sprite ID in the sprite sequence slot. <strong>default: 0</strong>
(<em>optional</em>)
</li>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">life</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Lifespan in seconds. <strong>default: 2</strong>
(<em>optional</em>)
</li>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">maxYVel</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Maximum vertical velocity in world units per second. <strong>default: 0</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">gravity</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Effect of gravity in world units per second. Positive value ascend, negative value descend. <strong>default: 0</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">friction</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Friction affecting velocity over time in world units per second. <strong>default: 0</strong>
(<em>optional</em>)
</li>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">startRot</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Rotation at start of life. <strong>default: random</strong>
(<em>optional</em>)
</li>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">rotVel</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Rotational velocity in degrees per second. <strong>default: 0</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">startSize</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Size at start of life. <strong>default: 10</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">endSize</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Size at end of life. <strong>default: 0</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">startColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
2025-03-15 18:01:27 +11:00
Color at start of life. <strong>default: Color(255, 255, 255)</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">endColor</span>
<span class="types"><a class="type" href="../3 primitive classes/Color.html#">Color</a></span>
2025-03-15 18:01:27 +11:00
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>)
</li>
<li><span class="parameter">blendMode</span>
<span class="types"><a class="type" href="../4 enums/Effects.BlendID.html#">BlendID</a></span>
2025-03-15 18:01:27 +11:00
Render blend mode. <strong>default: TEN.Effects.BlendID.ALPHA_BLEND</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">damage</span>
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
Harm the player on collision. <strong>default: false</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">poison</span>
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
Poison the player on collision. <strong>default: false</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">burn</span>
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
Burn the player on collision. <strong>default: false</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">wind</span>
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
Affect position by wind in outside rooms. <strong>default: false</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">damageHit</span>
<span class="types"><span class="type">int</span></span>
2025-03-15 18:01:27 +11:00
Player damage amount on collision. <strong>default: 2</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">light</span>
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
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>)
</li>
<li><span class="parameter">lightRadius</span>
<span class="types"><span class="type">int</span></span>
2025-03-15 18:01:27 +11:00
Light radius in 1/4 blocks. <strong>default: 0</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">lightFlicker</span>
<span class="types"><span class="type">int</span></span>
2025-03-15 18:01:27 +11:00
Interval at which the light should flicker. <strong>default: 0</strong>
(<em>optional</em>)
</li>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">soundID</span>
<span class="types"><span class="type">int</span></span>
2025-03-15 18:01:27 +11:00
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>
(<em>optional</em>)
</li>
<li><span class="parameter">animated</span>
<span class="types"><span class="type">bool</span></span>
2025-03-15 18:01:27 +11:00
Play animates sprite sequence. <strong>default: false</strong>
(<em>optional</em>)
</li>
2025-03-15 18:01:27 +11:00
<li><span class="parameter">animType</span>
<span class="types"><a class="type" href="../4 enums/Effects.ParticleAnimationType.html#">ParticleAnimationType</a></span>
2025-03-15 18:01:27 +11:00
Animation type of the sprite sequence. <strong>default: TEN.Effects.ParticleAnimationType.LOOP</strong>
(<em>optional</em>)
</li>
<li><span class="parameter">frameRate</span>
<span class="types"><span class="type">float</span></span>
2025-03-15 18:01:27 +11:00
Sprite sequence animation framerate. <strong>default: 1</strong>
(<em>optional</em>)
</li>
</ul>
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>