particles properties in special lua file

How would you setup an external lua files containing all the particles type (not using module) ?
I’m not sure about the simpliest way of doing it (both the particles.lua and the way I call it)

Thx! [import]uid: 9328 topic_id: 33806 reply_id: 333806[/import]

in the separate lua file:

[lua]local particleData = {}

particleData.getParticle1 = function()
local particle1Params = { [Your parameters here] }
return particle1Params
end

particleData.getParticle2 = function()
local particle2Params = { [Your parameters here] }
return particle2Params
end

return particleData[/lua]

And, assuming you use Particle Candy, you call it like this:
[lua]local particleData = require( “name_of_your_particle_data_file” )

particles.CreateEmitter(name, x, y, rotation, visible, loop, autoDestroy)
particles.CreateParticleType ( “particle1”, particleData.getParticle1() )[/lua] [import]uid: 181948 topic_id: 33806 reply_id: 134424[/import]

Thank you ! [import]uid: 9328 topic_id: 33806 reply_id: 134502[/import]

You’re welcome!

Let me know if you have any problems getting it running.

-Treb [import]uid: 181948 topic_id: 33806 reply_id: 134507[/import]

in the separate lua file:

[lua]local particleData = {}

particleData.getParticle1 = function()
local particle1Params = { [Your parameters here] }
return particle1Params
end

particleData.getParticle2 = function()
local particle2Params = { [Your parameters here] }
return particle2Params
end

return particleData[/lua]

And, assuming you use Particle Candy, you call it like this:
[lua]local particleData = require( “name_of_your_particle_data_file” )

particles.CreateEmitter(name, x, y, rotation, visible, loop, autoDestroy)
particles.CreateParticleType ( “particle1”, particleData.getParticle1() )[/lua] [import]uid: 181948 topic_id: 33806 reply_id: 134424[/import]

Thank you ! [import]uid: 9328 topic_id: 33806 reply_id: 134502[/import]

You’re welcome!

Let me know if you have any problems getting it running.

-Treb [import]uid: 181948 topic_id: 33806 reply_id: 134507[/import]