2022-07-27 20:40:20 +01:00
< !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 >
2024-11-21 18:27:42 +01:00
< title > TombEngine 1.6 Lua API< / title >
2022-07-27 20:40:20 +01:00
< 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 / >
2024-12-15 19:24:49 +03:00
< h1 > TombEngine< / h1 >
2022-07-27 20:40:20 +01:00
< 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 >
2023-11-09 18:28:02 +00:00
< 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 >
2023-11-09 18:28:02 +00:00
< 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 >
2023-11-09 18:28:02 +00:00
< li > < a href = "../1 modules/Util.html" > Util< / a > < / li >
< li > < a href = "../1 modules/View.html" > View< / a > < / li >
2022-07-27 20:40:20 +01:00
< / 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 >
< 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 >
2024-12-15 19:24:49 +03:00
< li > < a href = "../2 classes/View.DisplaySprite.html" > View.DisplaySprite< / a > < / li >
2022-07-27 20:40:20 +01:00
< / ul >
< h2 > 3 Primitive Classes< / h2 >
< ul class = "nowrap" >
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.Mirror.html" > Flow.Mirror< / a > < / li >
< li > < a href = "../3 primitive classes/Flow.SkyLayer.html" > Flow.SkyLayer< / a > < / li >
< li > < a href = "../3 primitive classes/Flow.Starfield.html" > Flow.Starfield< / a > < / li >
< li > < a href = "../3 primitive classes/Flow.Statistics.html" > Flow.Statistics< / 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 >
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 >
2022-07-27 20:40:20 +01:00
< / 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 >
2024-12-15 19:24:49 +03:00
< li > < a href = "../4 enums/Flow.ErrorMode.html" > Flow.ErrorMode< / a > < / li >
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 >
2024-12-15 19:24:49 +03:00
< li > < a href = "../4 enums/Flow.WeaponType.html" > Flow.WeaponType< / a > < / li >
2023-11-09 18:28:02 +00:00
< li > < a href = "../4 enums/Input.ActionID.html" > Input.ActionID< / a > < / li >
2023-09-28 19:20:04 +01:00
< li > < a href = "../4 enums/Objects.AmmoType.html" > Objects.AmmoType< / 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 >
2023-11-09 18:28:02 +00:00
< 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 >
2023-11-09 18:28:02 +00:00
< li > < a href = "../4 enums/Util.LogLevel.html" > Util.LogLevel< / a > < / li >
2023-11-11 12:16:23 +00:00
< li > < a href = "../4 enums/View.AlignMode.html" > View.AlignMode< / a > < / li >
2023-11-09 18:28:02 +00:00
< li > < a href = "../4 enums/View.CameraType.html" > View.CameraType< / a > < / li >
2024-01-07 13:22:52 +00:00
< li > < a href = "../4 enums/View.PostProcessMode.html" > View.PostProcessMode< / a > < / li >
2023-11-11 12:16:23 +00:00
< li > < a href = "../4 enums/View.ScaleMode.html" > View.ScaleMode< / a > < / li >
2022-07-27 20:40:20 +01:00
< / ul >
2022-07-29 21:12:54 +01:00
< h2 > 5 Lua utility modules< / h2 >
< ul class = "nowrap" >
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 >
2022-07-29 21:12:54 +01:00
< / ul >
2022-07-27 20:40:20 +01:00
< / 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, velocity, spriteIndex, gravity, rot, startColor, endColor, blendMode, startSize, endSize, lifetime, damage, poison)< / a > < / td >
< td class = "summary" > Emit a particle.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#EmitShockwave" > EmitShockwave(pos, innerRadius, outerRadius, color, lifetime, speed, angle, hurtsLara)< / a > < / td >
< td class = "summary" > Emit a shockwave, similar to that seen when a harpy projectile hits something.< / td >
< / tr >
< tr >
2024-11-29 00:09:29 +03:00
< 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 >
2024-11-29 00:09:29 +03:00
< 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 >
< 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 >
2024-11-20 08:15:26 +01:00
< tr >
< td class = "name" > < a href = "#GetWind" > GetWind()< / a > < / td >
2024-11-20 23:54:39 +03:00
< td class = "summary" > Get the wind vector for the current game frame.< / td >
2024-11-20 08:15:26 +01:00
< / tr >
2022-07-31 20:39:07 +01:00
< / table >
2022-07-27 20:40:20 +01:00
< 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, velocity, spriteIndex, gravity, rot, startColor, endColor, blendMode, startSize, endSize, lifetime, damage, poison)< / strong >
< / dt >
< dd >
< p > Emit a particle. < / p >
< pre > < code > See the sprite editor in WadTool for DEFAULT_SPRITES to see a list of sprite indices.
< / code > < / pre >
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" > velocity< / 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" > spriteIndex< / span >
< span class = "types" > < span class = "type" > int< / span > < / span >
an index of a sprite in DEFAULT_SPRITES object.
< / li >
< li > < span class = "parameter" > gravity< / span >
< span class = "types" > < span class = "type" > int< / span > < / span >
(default 0) Specifies whether particle will fall (positive values) or ascend (negative values) over time. Clamped to [-32768, 32767], but values between -1000 and 1000 are recommended; values too high or too low (e.g. under -2000 or above 2000) will cause the velocity of the particle to "wrap around" and switch directions.
< / li >
< li > < span class = "parameter" > rot< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
(default 0) specifies a speed with which it will rotate (0 = no rotation, negative = anticlockwise rotation, positive = clockwise rotation).
< / 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 >
2022-07-31 20:39:07 +01:00
(default Color(255, 255, 255)) color at start of life
< / 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 >
2022-07-31 20:39:07 +01:00
(default Color(255, 255, 255)) color to fade to - at the time of writing this fade will finish long before the end of the particle's life due to internal maths
< / 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 >
2022-08-08 21:43:41 +01:00
(default TEN.Effects.BlendID.ALPHABLEND) How will we blend this with its surroundings?
2022-07-31 20:39:07 +01:00
< / li >
< li > < span class = "parameter" > startSize< / span >
< span class = "types" > < span class = "type" > int< / span > < / span >
(default 10) Size on spawn. A value of 15 is approximately the size of Lara's head.
< / li >
< li > < span class = "parameter" > endSize< / span >
< span class = "types" > < span class = "type" > int< / span > < / span >
(default 0) Size on death - the particle will linearly shrink or grow to this size during its lifespan
< / li >
< li > < span class = "parameter" > lifetime< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
(default 2) Lifespan in seconds
< / li >
< li > < span class = "parameter" > damage< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
(default false) specifies whether particle can damage Lara (does a very small amount of damage, like the small lava emitters in TR1)
< / li >
< li > < span class = "parameter" > poison< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
(default false) specifies whether particle can poison Lara
< / li >
< / ul >
< h3 > Usage:< / h3 >
< ul >
< pre class = "example" > EmitParticle(
yourPositionVarHere,
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" > -- spriteIndex
< / span > < span class = "number" > 0< / span > , < span class = "comment" > -- gravity
< / span > -< span class = "number" > 2< / span > , < span class = "comment" > -- rot
< / 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
2022-08-08 21:43:41 +01:00
< / 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" > -- lifetime
< / span > < span class = "keyword" > false< / span > , < span class = "comment" > -- damage
< / span > < span class = "keyword" > true< / span > < span class = "comment" > -- poison
< / span > )< / pre >
< / ul >
< / dd >
< dt >
< a name = "EmitShockwave" > < / a >
< strong > EmitShockwave(pos, innerRadius, outerRadius, color, lifetime, speed, angle, hurtsLara)< / strong >
< / dt >
< dd >
Emit a shockwave, similar to that seen when a harpy projectile hits something.
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 >
2024-11-29 00:09:29 +03:00
< 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 >
2024-11-29 00:09:29 +03:00
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
2024-11-29 00:09:29 +03: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))
2024-11-29 00:09:29 +03:00
(< 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 >
2024-11-29 00:09:29 +03:00
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 = "EmitFire" > < / a >
< strong > EmitFire(pos, size)< / strong >
< / dt >
< dd >
Emit fire for one frame. Will not hurt Lara. Call this each frame if you want a continuous fire.
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 >
2024-11-20 08:15:26 +01:00
< / dd >
< dt >
< a name = "GetWind" > < / a >
< strong > GetWind()< / strong >
< / dt >
< dd >
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.()
2024-11-20 08:15:26 +01:00
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec3.html#" > Vec3< / a > < / span >
2024-11-20 23:54:39 +03:00
Wind vector.
2024-11-20 08:15:26 +01:00
< / ol >
2022-07-31 20:39:07 +01:00
< / dd >
< / dl >
2022-07-27 20:40:20 +01:00
< / div > <!-- id="content" -->
< / div > <!-- id="main" -->
< div id = "about" >
2023-03-31 20:51:44 +01:00
< 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 >
2022-07-27 20:40:20 +01:00
< / div > <!-- id="about" -->
< / div > <!-- id="container" -->
< / body >
< / html >