GMS 2.3+ Can you use multiple colors in a Particle Emitter?

My game has been using particle emitters because I prefer the workflow a lot more, it just seems a lot cleaner to me than individually creating particles. However, I haven’t found a way to use multiple colors in an emitter. I thought part_type_color3 might do the trick, but that just fades each particle between three colors, rather than choosing one of the colors to apply to the particle as i had hoped.
I could change the color every step which would work fine for Stream emitters, but since Burst emitters create all the particles at the same time that wouldn’t work.
Is there no built in function for randomly or incrementally setting each particle created to be a certain color out of a list? Creating a rainbow explosion would look pretty sweet but I can’t find a way to do it. Thank you :]


Friendly Tyrant
Forum Staff
For bursts, just don't use an emitter and use part_particles_create_colour() in a "for" or "repeat" loop. That permits you to colour each particle that is created any colour you want. :)


Firehammer Games
There are other functions for this, part_type_color_rgb, and part_type_color_mix. These do either blends of colors, or set min/max values for RGB. The glitch with the particle system(and part of why I say its underpowered) is that you can't really combine what @Nocturne is suggesting with having colors change over the lifetime of the particle, and I'm sure the same applies to the functions I mention.

The only way to do it with emitters would be to duplicate the emitter and have each one do a different pre-defined color. Otherwise, you can emit particles manually, either pre-defined or however you want.

One day, if they never get around to making the particle system better, I'll get around to making a much nicer, more powerful one.