Menu
Lumberyard
Legacy Reference

ScriptBind_Particle

CryLua is deprecated and will be removed in a future version of Lumberyard.

Lists C++ particle functions that you can call from Lua script.

Attach

Attaches an effect.

Syntax

Particle.Attach()

CreateDecal

Creates a decal with the specified parameters.

Syntax

Particle.CreateDecal(Vec3 pos, Vec3 normal, float size, float lifeTime, const char *textureName)

Parameter Description
pos The decal position vector.
normal The decal normal vector.
size The decal size, expressed as a float.
lifeTime The decal lifetime, expressed as a float.
textureName The name of the texture.

CreateEffect

Creates a particle effect.

Syntax

Particle.CreateEffect(const char *name, SmartScriptTable params)

Parameter Description
name The name of the particle effect.
params A SmartScriptTable of effect parameters.

CreateMatDecal

Creates a material decal.

Syntax

Particle.CreateMatDecal(Vec3 pos, Vec3 normal, float size, float lifeTime, const char *materialName)

Parameter Description
pos The decal position vector.
normal The decal normal vector.
size The decal size, expressed as a float.
lifeTime The decal lifetime, expressed as a float.
materialName The name of the material.

DeleteEffect

Deletes the specified particle effect.

Syntax

Particle.DeleteEffect(const char *name)

Parameter Description
name The name of the particle effect to delete.

Detach

Detaches an effect.

Syntax

Particle.Detach()

IsEffectAvailable

Checks if the specified particle effect is available.

Syntax

Particle.IsEffectAvailable(const char *name)

Parameter Description
name The name of the particle effect to check for availability.

SpawnEffect

Spawns an effect.

Syntax

Particle.SpawnEffect(const char *effectName, Vec3 pos, Vec3 dir)

Parameter Description
effectName The name of the effect to spawn.
pos The position vector of the effect.
dir The direction vector of the effect.

SpawnEffectLine

Spawns an effect line.

Syntax

Particle.SpawnEffectLine(const char *effectName, Vec3 startPos, Vec3 endPos, Vec3 dir, float scale, int slices)

Parameter Description
effectName The name of the effect.
startPos The start position of the effect.
endPos The end position of the effect.
dir The direction of the effect.
scale The scale value of the effect, expressed as a float.
slices The number of slices.

SpawnParticles

Spawns a particle effect.

Syntax

Particle.SpawnParticles(SmartScriptTable params, Vec3 pos, Vec3 dir)

Parameter Description
params A SmartScriptTable of particle effect parameters.
pos The position vector of the particle effect.
dir The direction vector of the particle effect.