Forums

OverviewV-Play 1 SupportParticle: How to continously change the emission rate › Reply To: Particle: How to continously change the emission rate

OverviewV-Play 1 SupportParticle: How to continously change the emission rate › Reply To: Particle: How to continously change the emission rate
#5176

Alex
V-Play Team

Hi Thomas,

do you want something like the afterburner of the spaceship getting stronger?

Then i recommend using the particle size. I took your code, added a fire-style particle.png, and modified the particle size like this:

Timer {
  id: timer
  interval: 200; running: true; repeat: true
  onTriggered: {
    var scale = 0.5 + Math.sin(time_ms / 1000 * 0.7) * 0.5;
    particles1.item.startParticleSize = Math.floor(scale * 10);
    /*particles2.item.particleLifespan = scale;
    inputText.text = "Input: " + Math.floor(100.0 * scale) / 100.0 + 
    "\nmaxParticles: " + particles1.item.maxParticles + 
    "\nparticleLifespan: " + Math.floor(100.0 * particles2.item.particleLifespan) / 100.0;*/
    time_ms += timer.interval;
  }
}

With this, or maybe in combination with finishParticleSize and speed, you should be able to achieve the result you are looking for.

Let me know if that works for you!

 

Best Regards,

Alexander

 

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support