Particle Designer Issues

Hey guys.  It looks like this has been fixed, but I wanted  you to know that I have a tool for loading ‘Particle Designer’ files and generating an emitter that will also handle these issues by checking for legal values and fixing them when they are not legal.

This tool also allows you to:

  • Load the emitter data and image file from any folder (not necessarily the same).
  • Dynamically (at call time) change any parameters.  Ex: You might want to tune duration to different values and with this loader you can do that in the same single-line you use to load and build the emitter.
  • Load alternative textures for an emitter definition.
  • Load alternative emitter formats (not so important for PD2 users).

You can find out more on my site if you’re interested.  Look for the ‘Universal Emitter Loader’ (aka PEX Tools).  

You can read the docs here if you’re interested.

Some example calls, just for your edification: 

------------------------------------------------------------------ -- 1. Simplest example (load emitter and particle from root folder) -- local emitter = pex.loadPD2( nil, 200, 100, "Comet.json" ) ------------------------------------------------------------------ -- 2. Load emitter and particle from subfolder (automatically modifies path for particle) -- local emitter = pex.loadPD2( nil, 200, 100, "emitters/ParticleDesigner2/Comet.json", { texturePath = "emitters/ParticleDesigner2/" } ) ------------------------------------------------------------------ -- 3. Same as above, but different texture in same folder -- local emitter = pex.loadPD2( nil, 200, 100, "emitters/ParticleDesigner2/Comet.json", { texturePath = "emitters/ParticleDesigner2/", altTexture = "texture.png" } ) ------------------------------------------------------------------ -- 4. Same as above, but load alternative texture -- local emitter = pex.loadPD2( nil, 200, 100, "emitters/ParticleDesigner2/Comet.json", { altTexture = "images/star.png" } ) ------------------------------------------------------------------ -- 5. Override parameters -- local emitter = pex.loadPD2( nil, 200, 100, "emitters/ParticleDesigner2/Comet.json", { altTexture = "images/star.png", duration = 3.0, particleLifespan = 1.0, particleLifespanVariance = 0.5 } )  

One more quick post.  I double checked and used ‘mlcraigs’ emitter output and was able to load and create it with these two lines:

(The key was using the ‘fixNumbers’ option):

local emitter1 = pex.loadPD2( nil, 240, 160,                               "emitters/ParticleDesigner2/big\_flames.json",                               { texturePath = "emitters/ParticleDesigner2/", fixNumbers = true } ) local emitter1 = pex.loadPD2( nil, 400, 40,                               "emitters/ParticleDesigner2/fire.json",                               { texturePath = "emitters/ParticleDesigner2/", fixNumbers = true } ) 

https://www.youtube.com/watch?v=Quuef0owBUI&feature=youtu.be&hd=1

@roaminggamer – this tool looks very useful