ParticleSystem , Start - Endsprite with loop possible ?

Advanced game related topics
True29
User
User
Posts: 64
Joined: Sun Feb 03, 2013 1:50 am

ParticleSystem , Start - Endsprite with loop possible ?

Post 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

True29
User
User
Posts: 64
Joined: Sun Feb 03, 2013 1:50 am

Re: ParticleSystem , Start - Endsprite with loop possible ?

Post by True29 »

have found a solution ;)

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

thanks.
closed.
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: ParticleSystem , Start - Endsprite with loop possible ?

Post 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
----

R Tape loading error, 0:1
Post Reply