Particles

Guide Yeshttps://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/09/particle/PexTools.pdf

Moving Up to You :  It is easy.  Just use an enterFrame listener attached to the mover and have the listener move the emitter to match the position of the moving object (the mover).

What you tried is wrong and the guide doesn’t show that…  it shows this (page 5) as a basic call:

local emitter = pex.loadStarling( nil, 200, 100, "particle3.pex" )

Note: You don’t call display.newEmitter(), because the loader does that for you.  The loader creates a new emitter.

The Right Way

Now, assuming that:

  1. Your emitter definition is in folder: “emitters/Starling/”

  2. Your emitter definition is named “particle.pex”

  3. Your emitter texture is in the folder “emitters/Starling/”.

  4. The emitter texture name is: “texture.png”

You would do this:

local shipEmitter = pex.loadStarling( nil, 0, 0, "emitters/Starling/particle.pex", { texturePath = "emitters/Starling/", altTexture = "texture.png" } )

This will produce an emitter at position 0, 0 and place it in the default group (current stage).

The pex tool comes with a guide and a number of samples.  

If you don’t have these please tell me where you got pex loader so I can fix the problem.

i bought it from you :slight_smile:

reason tryed the code above was because i couldnt get it to work, so that the emitter followed my ship :slight_smile:

it worked! thanks alot. guess i just didnt understand the loader to begin with xD but its solved now, thanks alot, hope you come up with more fancy products like this in the future :smiley:

Is that, “The emitter worked”, or “I have it following my ship.”?

If you don’t have it following your ship yet, try something like this (may need to change to suit your needs):

local shipEmitter = pex.loadStarling( nil, 0, 0, "emitters/Starling/particle.pex", { texturePath = "emitters/Starling/", altTexture = "texture.png" } ) local ship = display.newCircle( 10, 10, 10 ) function ship.enterFrame( self ) shipEmitter.x = self.x shipEmitter.y = self.y end Runtime:addEventListener( "enterFrame", ship )

yes to both :slight_smile: it works smoothly . with the enterframe event you told me :slight_smile:

Hi. We just release Radiance. A windows tool to create particles for Corona.

https://marketplace.coronalabs.com/asset/radiance-particle-effect-creator

Regards

Tommy