• 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!

Particle systems drawn immediately instead of building up

I

Ian

Guest
So if you used unity before it has a 'Pre warm' feature which returns a Boolean. (Example uses a PS that loops) False means the particle system builds up and then starts to loop like default; True means it starts looping when instantiated, no build up time.

Whats the equivalent on GM Particles or any workarounds?
 

Phil Strahl

Member
So if I understood your question correctly, you want to run a particle simulation for a bit before the first time it gets draw. For that in GML, you first have to turn off part_system_automatic_update() and invoke part_system_update() repeatedly manually before drawing it the first time. E.g.
Code:
// usually in the create-event:
part_system_automatic_update(snow_system, false);
repeat(room_speed * 2)
{
   part_system_update(snow_system);
}
This code would update your particle system "snow_system" for two seconds worth of steps before you draw it the first time. Just don't forget to either switch part_system_automatic_update() back on or manually update the system once each step.
 

FredFredrickson

Artist, designer, & developer
GMC Elder
So if I understood your question correctly, you want to run a particle simulation for a bit before the first time it gets draw. For that in GML, you first have to turn off part_system_automatic_update() and invoke part_system_update() repeatedly manually before drawing it the first time. E.g.
Code:
// usually in the create-event:
part_system_automatic_update(snow_system, false);
repeat(room_speed * 2)
{
   part_system_update(snow_system);
}
This code would update your particle system "snow_system" for two seconds worth of steps before you draw it the first time. Just don't forget to either switch part_system_automatic_update() back on or manually update the system once each step.
That's a neat trick that I didn't know you could do - nice!
 
I

Ian

Guest
So if I understood your question correctly, you want to run a particle simulation for a bit before the first time it gets draw. For that in GML, you first have to turn off part_system_automatic_update() and invoke part_system_update() repeatedly manually before drawing it the first time. E.g.
Code:
// usually in the create-event:
part_system_automatic_update(snow_system, false);
repeat(room_speed * 2)
{
   part_system_update(snow_system);
}
This code would update your particle system "snow_system" for two seconds worth of steps before you draw it the first time. Just don't forget to either switch part_system_automatic_update() back on or manually update the system once each step.
Thanks for the neat trick :)
 
Top