sm.effect.playEffect
Plays an effect. If this function is called on the server it will play the effect on all clients.
Kind: Function
Environments: Game
Game
sm.effect.playEffect(
name,
position,
velocity,
rotation,
scale,
parameters,
startTime,
world
)
Note: If you start a looping effect using this function you will not be able to stop it.
Please use createEffect for looping effects.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | The name. |
position (optional) |
Vec3 | The position. (Defaults to [0,0,0]) |
velocity (optional) |
Vec3 | The velocity. (Defaults to no velocity) |
rotation (optional) |
Quat | The rotation. (Defaults to no rotation) |
scale (optional) |
Vec3 | The scale. (Defaults to no scale, only applied to renderables) |
parameters (optional) |
table | The table containing the parameters for the effect. (Defaults to no parameters) |
startTime (optional) |
number | The initial time progression of the effect. Can be used to fast forward some effect parts. Can be used to delay effect part activation if negative. |
world (optional) |
World | The world to play the effect in. (Defaults to World from script context) |