part_type_colour_rgb

Set the particle colour from a red, green and blue range.

Syntax:

GML Code Example

part_type_colour_rgb(ind, rmin, rmax, gmin, gmax, bmin, bmax p>


Argument Description
ind The index of the particle type to change.
rmin The minimum the final colour's red component can be.
rmax The maximum the final colour's red component can be.
gmin The minimum the final colour's green component can be.
gmax The maximum the final colour's green component can be.
bmin The minimum the final colour's blue component can be.
bmax The maximum the final colour's blue component can be.


Returns: N/A


Description

With this function you can set the mix of red, green and blue colours for all particles created of the given type. You supply a minimum value and a maximum value for each of the three components and the particles created will have a random colour based on the given range of parameters. All values must be between 0 and 255.


Example:

GML Code Example

part_type_rgb(global.Blood_Part, 0, 255, 0, 0, 0, 0);

The above code sets each particle emitted of the particle type indexed in the global variable "Blood_Part" to be only different shades of red.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here