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.
game.Effects:Particles(path, options?)
Starts one of the game's particle effects on something.
game.Effects:Particles(path: string, options?: WaxParticleOptions): WaxParticles| Parameter | Type | Description |
|---|---|---|
path | string | The path of a particle effect of the game. game.Effects:Find looks for one. |
options (optional) | WaxParticleOptions |
Returns WaxParticles
game.Effects:Light(options?)
Makes a point light on something.
game.Effects:Light(options?: WaxLightOptions): WaxLight| Parameter | Type |
|---|---|
options (optional) | WaxLightOptions |
Returns WaxLight
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| Parameter | Type | Description |
|---|---|---|
on | any | A thing of a blueprint, a part, a character or a creature. |
options (optional) | WaxTrailOptions |
Returns WaxTrail
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| Parameter | Type | Description |
|---|---|---|
scale (optional) | number | How strong. 1 when omitted. |
path (optional) | string | The path of a camera shake of the game. A footstep of a mammoth when omitted. |
Returns boolean (shaken)
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| Parameter | Type |
|---|---|
text | string |
Returns
string[](paths)integer(total)
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| Parameter | Type |
|---|---|
text (optional) | string |
Returns
string[](paths)integer(total)
game.Sounds
game.Sounds: the game's own sounds.
Type name: WaxSounds.
game.Sounds:Play(path, options?)
Plays one of the game's sounds.
game.Sounds:Play(path: string, options?: WaxSoundOptions): boolean| Parameter | Type | Description |
|---|---|---|
path | string | The path of a sound of the game. game.Sounds:Find looks for one. |
options (optional) | WaxSoundOptions |
Returns boolean (played)
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| Parameter | Type | Description |
|---|---|---|
text | string | Words such as "whoosh bear". |
Returns
string[](paths)integer(total)
WaxParticles
A particle effect that was started.
You get one from game.Effects:Particles. Below, particles stands for one of these.
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| Parameter | Type |
|---|---|
name | string |
value | number | string | table |
Returns WaxParticles
particles:Stop()
particles:Stop()Returns nothing.
particles:IsAlive()
particles:IsAlive(): booleanReturns boolean
WaxLight
A light that was made.
You get one from game.Effects:Light. Below, light stands for one of these.
light:Stop()
light:Stop()Returns nothing.
light:IsAlive()
light:IsAlive(): booleanReturns boolean
light:SetColor(color)
light:SetColor(color: string|table)| Parameter | Type |
|---|---|
color | string | table |
Returns nothing.
light:SetIntensity(intensity)
light:SetIntensity(intensity: number)| Parameter | Type |
|---|---|
intensity | number |
Returns nothing.
WaxTrail
A trail that is running.
You get one from game.Effects:Trail. Below, trail stands for one of these.
trail:Stop()
Stops it growing. What is left of the ribbon runs out and is taken away.
trail:Stop()Returns nothing.
trail:IsAlive()
trail:IsAlive(): booleanReturns boolean
WaxParticleOptions
What game.Effects:Particles takes besides the path.
Used by game.Effects:Particles.
| Option | Type | Description |
|---|---|---|
on | any | What it hangs on: a character, a creature, a thing of a blueprint or a part. game.Me when omitted. |
socket | string | A 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. |
seconds | number | false | How long it stays. 3 when omitted. False keeps it until it is stopped. |
set | table<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.
| Option | Type | Description |
|---|---|---|
on | any | What it hangs on. game.Me when omitted. |
socket | string | A 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. |
color | string | table | "Red", "#rrggbb" or { R = , G = , B = }. Red when omitted. |
intensity | number | How bright. 5000 when omitted. |
radius | number | How far it reaches. 400 when omitted, which is four metres. |
seconds | number | false | How long it stays. 3 when omitted. False keeps it until it is stopped. |
fade | number | Seconds over which it dims at the end. |
WaxTrailOptions
What game.Effects:Trail takes besides what it follows.
Used by game.Effects:Trail.
| Option | Type | Description |
|---|---|---|
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. |
color | string | table | Red when omitted. |
seconds | number | How long the ribbon is, in time. 0.25 when omitted. |
life | number | How long it runs. Until it is stopped when omitted. |
width | number | Makes 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_view | boolean | True 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. |
delay | number | It 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. |
embers | number | { 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. |
material | WaxInstance | A 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.
| Option | Type | Description |
|---|---|---|
on | any | What the sound comes from. When omitted it is heard everywhere at the same loudness. |
socket | string | A bone or socket of what it comes from. |
at | { X: number, Y: number, Z: number } | number[] | Where it comes from, measured from that. |