Page 1 of 1

ParticleSystem , Start - Endsprite with loop possible ?

Posted: Wed Apr 02, 2014 11:40 am
by True29
Hello Greet;)
sorry for the Comic thread title a lot to me no better man one;)

I have a Particlesystem in which I can specify the start and endSprite for the lifetime will then change the sprite.
Now I would like that when I set a flag loop = True, he when he starts at the end reached is at 0.
Kp like best? Greetings and thank you for your suggestions.
A demo, or broken code I have now not I would have to create.

Code: Select all

Prozedur ADD_PARTICLE2(*ParticleTemplate.Particle .....)
Protected.f fInvLifeTime = 1.0 / fLifeTime
    AddElement(Particle())   
    With Particle() 
 
         ;// Start und Endsprite bestimmen
      \Particle             = *ParticleTemplate\StartParticle
      \DeltaParticle          = (*ParticleTemplate\EndParticle - *ParticleTemplate\StartParticle) * fInvLifeTime 

       ;...... Rest

    endwith()
endprozedur()

procedure MOVE_PARTICLE(fTime.f)
      ;// Partikel animieren
      \Particle + \DeltaParticle * fTime.f
endprozedur

Procedure RENDER_PARTICLE(fTime.f)
  DisplaySprite()
Endprozedur
now i had test this . But give me error because the the number in "\Particle" becomes not existing sprite numbers.

Code: Select all

      ;// Partikel animieren
      \Particle + \DeltaParticle * fTime.f
      
;        If \Particleloop
        ;/ Last Particlesprite ? set new startparticle
;          If \Particle = \EndParticle
;            \Particle = \StartParticle
;            Debug "reset"
;          EndIf          
;        EndIf


Re: ParticleSystem , Start - Endsprite with loop possible ?

Posted: Wed Apr 02, 2014 7:36 pm
by True29
have found a solution ;)

to integrated a Animation system in the ParticleSystem to Animation the Sprites.

thanks.
closed.

Re: ParticleSystem , Start - Endsprite with loop possible ?

Posted: Tue Jul 08, 2014 9:08 am
by em_uk
Hi

How about sharing or hinting on what you found so that when someone searches the forum and finds this there is some sort of solution here?

Cheers