setEffectEvolution
Shared
Changes the level of one of an effect's evolutions, a parameter the effect itself declares to vary its look.
bool setEffectEvolution(effect effect, string name, float level)
Parameters
| Name | Type | Description |
|---|---|---|
| effect | effect | The effect. |
| name | string | The evolution's name, from 1 to 63 bytes. Case does not matter. |
| level | float | The evolution's level. |
Returns
true if it changed. false with a wrong argument (logs a warning).
On the server, the change reaches every client. On a client, changing an effect the server created only holds on this client until the server sends its state again.
Example
local fire = createEffect("fire_large", 2495.1, -1687.4, 13.5)
setEffectEvolution(fire, "strength", 0.3)NoteAn effect keeps at most 16 evolutions. A 17th with a new name logs a warning and returns
false.