Hi ReFreezed,
This is absolutely amazing fun to play with, thanks very much !
I have just started programming with love2d.
Would it be possible to get a template or example on how to use the exported data in love2d main.lua file ?
Basically how to use the particle in game after exporting.
Many thanks,
J.
@ReFreezed
Thank you that's really amazing ! It's such a brilliant way of doing things
I have removed the local in the ps code so as to expose the values in main.lua
Is there a more elegant way to do this perhaps ? I'm thinking maybe an option on export to exclude the local option
Also when more than one ps is exported to the same file would it be possible to name them ps1.. ps2.. ps3 etc. One can do this manually of course.
I'm not sure if I am using this correctly yet (baby steps). Anyhow, top program, may have a few more questions thanks for your work,
J.
EDIT: How do I trigger starting the ps ? is that something to do with kickstart perhaps ? I need a reset function I think.
@Jayverb
Instead of making anything in the exported module global, just say particleDatas[1] or particleDatas[2] etc. in main.lua to refer to the different particle systems if you don't want to use loops like in the example project. It's generally bad to create globals if it's not absolutely needed.
I've updated the example to show how the kick-starting is supposed to work and some other stuff. I hope it helps.
@ReFreezed
Thanks, that's helped a great deal.
Is there a way to get control of an emmiter position ?
For example moving the emmiter from x - x at runtime ? ( firing a patricle )
I can't find anything in the ReadMe or in the exported module parameters.
I know how to x=x+speed*dt so it would be absolutely awesome to be able to throw these things around
Thanks,
J.
EDIT: Found out how with a bit of digging around.
ps:setPosition()
Is this something that could be included on export ?
@Jayverb
Particle systems' position and movement in the game is something that's outside the scope of this program I think, though I can see cases where exporting an "initial position" for particle systems could be useful. I'll add that to the todo list.
@ReFreezed
That would be great for placing stuff on a background image
You mentioned in previous post about accessing module values before.
"Instead of making anything in the exported module global, just say particleDatas[1] or particleDatas[2] etc. in main.lua to refer to the different particle systems"
How would I put this in the main.lua ? So I can access a parameter say on particleDatas[2] for example.
Also what part do shaders play ?