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

Legacy GM Particles Emitter

E

Ezled

Guest
Hello everyone.
I have this code:
Code:
part_emitter_stream(global.psUnder,emi_stars,global.bStars,1);
The problem is that the emitter generates 60 particles per sec (the room speed) and that's too much.

What can i do to generate half the amount of particles without change the room speed?
 

jazzzar

Member
If you're using that in a step event it will stream 60 particles, because the step event is executed room_speed of times in a single second, make an alarm that streams these particles, putting the alarm to 2 will make it stream 30 particles in a second which is the half of the room speed
EDIT: and i forgot to mention that you need to call alarm[0] = 2 or whatever you want, inside the alarm event itself, put a condition for it to stop tho, as it will continue forever if you don't do that
 
A

Aura

Guest
You can set the number argument to a negative number. For instance:

Code:
part_emitter_stream(global. Sname, p_emit1, p1, -2);
But the above method works on random dice rolls, so there's a probability of 1/2 that a particle would be created that step. If you want to have a fixed particle creation every other step, use part_particles_create() instead.
 
E

Ezled

Guest
You can set the number argument to a negative number. For instance:

Code:
part_emitter_stream(global. Sname, p_emit1, p1, -2);
But the above method works on random dice rolls, so there's a probability of 1/2 that a particle would be created that step. If you want to have a fixed particle creation every other step, use part_particles_create() instead.
This works perfect, thanks!
 
Top