engineAddEffects
Client
Registers the particle effects in a file of the resource, so createEffect can use them by name.
table|false engineAddEffects(string path [, int priority = 0])
Parameters
| Name | Type | Description |
|---|---|---|
| path | string | Path of the effects file (the <Effect> entries of an XML) in the resource. |
| priority | int | Priority over effects of the same name from other resources and packs. The highest wins; among equals, the one added last.default 0 |
Returns
A list of the names of the effects added, or false if the file could not be read.
An added effect covers another of the same name until it is removed or the resource stops. When the effect a name points to changes, the effects playing the covered one stop.
Example
local names = engineAddEffects("effects/neon.xml")
if names then
for _, name in ipairs(names) do
outputDebugString("effect added: " .. name)
end
endNoteA file with no effect in it logs a warning and returns
false.