Wax

Effects and sounds

game.Effects and game.Sounds: particles, lights, trails, camera shakes and the game's sounds.

The Explorer searches everything on this page, and the classes of the game too.

game.Effects

game.Effects: the game's particle effects, lights, glowing trails and camera shakes, on anything. Everything a mod started is taken away when the mod unloads. Nothing costs anything while no effect is alive.

Type name: WaxEffects.

Open in the Explorer

game.Effects:Particles(path, options?)

Starts one of the game's particle effects on something.

game.Effects:Particles(path: string, options?: WaxParticleOptions): WaxParticles
ParameterTypeDescription
pathstringThe path of a particle effect of the game. game.Effects:Find looks for one.
options (optional)WaxParticleOptions

Returns WaxParticles

Open in the Explorer

game.Effects:Light(options?)

Makes a point light on something.

game.Effects:Light(options?: WaxLightOptions): WaxLight
ParameterType
options (optional)WaxLightOptions

Returns WaxLight

Open in the Explorer

game.Effects:Trail(on, options?)

Leaves a glowing ribbon behind an edge of something that moves, such as a blade.

game.Effects:Trail(on: any, options?: WaxTrailOptions): WaxTrail
ParameterTypeDescription
onanyA thing of a blueprint, a part, a character or a creature.
options (optional)WaxTrailOptions

Returns WaxTrail

Open in the Explorer

game.Effects:Shake(scale?, path?)

Shakes the player's view with one of the game's camera shakes.

game.Effects:Shake(scale?: number, path?: string): boolean
ParameterTypeDescription
scale (optional)numberHow strong. 1 when omitted.
path (optional)stringThe path of a camera shake of the game. A footstep of a mammoth when omitted.

Returns boolean (shaken)

Open in the Explorer

game.Effects:Find(text)

The paths of the game's particle effects whose path holds every word given. At most 200, then how many there were.

game.Effects:Find(text: string): string[], integer
ParameterType
textstring

Returns

  • string[] (paths)
  • integer (total)

Open in the Explorer

game.Effects:FindShakes(text?)

The paths of the game's camera shakes whose path holds every word given.

game.Effects:FindShakes(text?: string): string[], integer
ParameterType
text (optional)string

Returns

  • string[] (paths)
  • integer (total)

Open in the Explorer

game.Sounds

game.Sounds: the game's own sounds.

Type name: WaxSounds.

Open in the Explorer

game.Sounds:Play(path, options?)

Plays one of the game's sounds.

game.Sounds:Play(path: string, options?: WaxSoundOptions): boolean
ParameterTypeDescription
pathstringThe path of a sound of the game. game.Sounds:Find looks for one.
options (optional)WaxSoundOptions

Returns boolean (played)

Open in the Explorer

game.Sounds:Find(text)

The paths of the game's sounds whose path holds every word given. At most 200, then how many there were.

game.Sounds:Find(text: string): string[], integer
ParameterTypeDescription
textstringWords such as "whoosh bear".

Returns

  • string[] (paths)
  • integer (total)

Open in the Explorer

WaxParticles

A particle effect that was started.

You get one from game.Effects:Particles. Below, particles stands for one of these.

Open in the Explorer

particles:Set(name, value)

Sets a parameter of the effect: a number, a colour ("Red", "#rrggbb", { R = , G = , B = }) or three numbers. The names belong to the effect. A name it does not have changes nothing.

particles:Set(name: string, value: number|string|table): WaxParticles
ParameterType
namestring
valuenumber | string | table

Returns WaxParticles

Open in the Explorer

particles:Stop()

particles:Stop()

Returns nothing.

Open in the Explorer

particles:IsAlive()

particles:IsAlive(): boolean

Returns boolean

Open in the Explorer

WaxLight

A light that was made.

You get one from game.Effects:Light. Below, light stands for one of these.

Open in the Explorer

light:Stop()

light:Stop()

Returns nothing.

Open in the Explorer

light:IsAlive()

light:IsAlive(): boolean

Returns boolean

Open in the Explorer

light:SetColor(color)

light:SetColor(color: string|table)
ParameterType
colorstring | table

Returns nothing.

Open in the Explorer

light:SetIntensity(intensity)

light:SetIntensity(intensity: number)
ParameterType
intensitynumber

Returns nothing.

Open in the Explorer

WaxTrail

A trail that is running.

You get one from game.Effects:Trail. Below, trail stands for one of these.

Open in the Explorer

trail:Stop()

Stops it growing. What is left of the ribbon runs out and is taken away.

trail:Stop()

Returns nothing.

Open in the Explorer

trail:IsAlive()

trail:IsAlive(): boolean

Returns boolean

Open in the Explorer

WaxParticleOptions

What game.Effects:Particles takes besides the path.

Used by game.Effects:Particles.

Open in the Explorer

OptionTypeDescription
onanyWhat it hangs on: a character, a creature, a thing of a blueprint or a part. game.Me when omitted.
socketstringA bone or socket of what it hangs on, such as "bn_Prop_R_1" for the right hand of the player's arms.
at{ X: number, Y: number, Z: number } | number[]Where it sits, measured from what it hangs on.
turn{ Pitch?: number, Yaw?: number, Roll?: number }How it is turned, in degrees.
secondsnumber | falseHow long it stays. 3 when omitted. False keeps it until it is stopped.
settable<string, number|string|table>Parameters of the effect, by name: a number, a colour, or three numbers.

WaxLightOptions

What game.Effects:Light takes.

Used by game.Effects:Light.

Open in the Explorer

OptionTypeDescription
onanyWhat it hangs on. game.Me when omitted.
socketstringA bone or socket of what it hangs on.
at{ X: number, Y: number, Z: number } | number[]Where it sits, measured from what it hangs on.
colorstring | table"Red", "#rrggbb" or { R = , G = , B = }. Red when omitted.
intensitynumberHow bright. 5000 when omitted.
radiusnumberHow far it reaches. 400 when omitted, which is four metres.
secondsnumber | falseHow long it stays. 3 when omitted. False keeps it until it is stopped.
fadenumberSeconds over which it dims at the end.

WaxTrailOptions

What game.Effects:Trail takes besides what it follows.

Used by game.Effects:Trail.

Open in the Explorer

OptionTypeDescription
from{ X: number, Y: number, Z: number } | number[]One end of the edge that leaves the trail, measured from what it follows.
to{ X: number, Y: number, Z: number } | number[]The other end. { 0, 0, 50 } when omitted.
colorstring | tableRed when omitted.
secondsnumberHow long the ribbon is, in time. 0.25 when omitted.
lifenumberHow long it runs. Until it is stopped when omitted.
widthnumberMakes it a streak this wide along the middle of the edge, always turned to face the view. Without it the ribbon lies between the edge's two ends, and a cut that comes straight at the view shows it from the side, as a line.
with_viewbooleanTrue keeps the trail with the view, as the arms of first person are, instead of leaving it behind in the world. For something held in first person.
delaynumberIt starts this many seconds from now. A swing winds up first, and a trail that only runs during the cut is one clean arc. life counts from when it starts.
embersnumber | { rate?: number, size?: number, life?: number, speed?: number, rise?: number }Small glowing bits that come off the edge while it moves: how many a second, or a table. They drift, rise and shrink to nothing. None when omitted.
materialWaxInstanceA material of your own in place of the plain glowing one, from game.Assets:Material. A thing held in first person is drawn bent toward the screen by its material, and a trail only lies on it when its material bends the same way.

WaxSoundOptions

What game.Sounds:Play takes besides the path.

Used by game.Sounds:Play.

Open in the Explorer

OptionTypeDescription
onanyWhat the sound comes from. When omitted it is heard everywhere at the same loudness.
socketstringA bone or socket of what it comes from.
at{ X: number, Y: number, Z: number } | number[]Where it comes from, measured from that.

On this page