It is currently Sat Oct 19, 2019 2:00 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: ParticleSystem , Start - Endsprite with loop possible ?
PostPosted: Wed Apr 02, 2014 11:40 am 
Offline
User
User

Joined: Sun Feb 03, 2013 1:50 am
Posts: 63
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:
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:
      ;// Partikel animieren
      \Particle + \DeltaParticle * fTime.f
     
;        If \Particleloop
        ;/ Last Particlesprite ? set new startparticle
;          If \Particle = \EndParticle
;            \Particle = \StartParticle
;            Debug "reset"
;          EndIf         
;        EndIf



Top
 Profile  
Reply with quote  
 Post subject: Re: ParticleSystem , Start - Endsprite with loop possible ?
PostPosted: Wed Apr 02, 2014 7:36 pm 
Offline
User
User

Joined: Sun Feb 03, 2013 1:50 am
Posts: 63
have found a solution ;)

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

thanks.
closed.


Top
 Profile  
Reply with quote  
 Post subject: Re: ParticleSystem , Start - Endsprite with loop possible ?
PostPosted: Tue Jul 08, 2014 9:08 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Aug 08, 2010 3:32 pm
Posts: 349
Location: Manchester 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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye