PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Particle system

Hi Kornalius,
Your particle system is incomplete in some way : you should add a method to relocate the emitter I mean to move (or change) the start position of the Particle, for instance something like this:
Code:

list$=getParticles(id$);
foreach(list$)
SetParticlePos(list$,newX$,newY$) ;
end;
Great idea, I will add this feature. :D
And another great idea is to add loop time - the time particles will be looped if loop parameter is set to true.
Some particle system bugs in a slightly changed version of demo particles.ppl
Comments:
1.)When we set fading parameter to -1, particle have to take original sprite's alpha.
2.) Bug with setting -1 for particles which are using pixel sprites(see effect1_proc).
Attachments:
Particles.ppl (4 KB)
Actually, use SpriteAlpha(spr1$) for the fade value. -1 is used for non-fading particles.

BTW: Don't forget to hide the two sprites you are using for the particles using ShowSprite().
New functions:

Particles(Id, ListVar);

and

SetParticle(ParticleHandle, StartX, StartY, AccelerationX, AccelerationY, MaxCycle);

added!