• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker can I slow down particles?

Mr Errorz

Member
I am using the built in particle system, and I have particles moving at a certain (and constant) speed,
I want to start decreasing the particles' speed at a certain point (not from the moment of creation), is that possible?
 

jackquake

Member
Not that I'm aware. However, when thinking of a fireworks particle system, at the end of the life of one particle (the lift-off), another one is activated (the burst). Perhaps you could create the same particle effect with a different speed at the end of its life. Hopefully this makes sense.
 

samspade

Member
I am using the built in particle system, and I have particles moving at a certain (and constant) speed,
I want to start decreasing the particles' speed at a certain point (not from the moment of creation), is that possible?
Yes. You need to take over the automatic updating of the event though and remember that you can only do it in whole steps.

This is my version of it using delta time.

Code:
#region //get delta
var _delta_time = DELTA_TIME;
var _gameplay_delta_time = GAMEPLAY_DELTA_TIME;
#endregion


#region //update particle system
counter += 1 * _gameplay_delta_time;
if (counter >= 1) {
     var counter_int = floor(counter);
     repeat (counter_int) {
         part_system_update(particle_system_layer);
     }
     counter -= counter_int;
}
#endregion
With some obvious missing pieces. Essentially, just disable the automatic updating then add a counter. Update the counter by 1 * slow_down where slow_down is a number between 0-1. The closer to 0 the slower it will update. This will also work to speed up the system. If you know that you will never do that, then you can lose the repeat which is there to handle an increase in speed.
 
Top