part_particles_create_colour

Create particles from a system at a given position and with a given colour.

Syntax:

part_particles_create_colour(ind, x, y, parttype, colour, number);


Argument Description
ind The index of the particle system.
x The x coordinate of where to create the particles.
y The y coordinate of where to create the particles.
parttype The index (type) of the particles to be created.
colour The colour blending for the particles.
number The number of particles to create.


Returns: N/A


Description

This function is ideal for those effects that do not require any of the functionality offered by particle emitters (for example, to create smoke from a missile, or a simple explosion effect) as it permits you to quickly and easily create particles at any position in the game room. You can also colour the particles "on the fly" as they are created with this function, and this colour will over-ride the predefined colour of the particle, but it does not blend this colour over the particles lifetime. Note that you must have created the particle system and the particle type previously for this function to be used.


Example:

if speed > 1
   {
   part_particles_create_colour(sname, x, y, p_MagicSmoke, choose(c_aqua, c_lime, c_fuschia, c_orange), 1);
   }

The above code will generate a single particle every step that the instance with the code has a speed greater than one. These particles will be of a random colour.


Back: Particle Systems
Next: part_system_exists
© Copyright YoYo Games Ltd. 2019 All Rights Reserved