part_particles_create

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. Note that you must have created the particle system and the particle type previously for this function to be used.

 

Syntax:

part_particles_create(ind, x, y, parttype, number);

Argument Type Description
ind Particle System Instance The index of the particle system.
x Real The x coordinate of where to create the particles.
y Real The y coordinate of where to create the particles.
parttype Particle Type ID The index (type) of the particles to be created.
number Real The number of particles to create.

 

Returns:

N/A

 

Example:

if mouse_check_button(mb_left)
{
    part_particles_create(sname, mouse_x, mouse_y, p_CursorEffect, 5);
}

The above code checks for the mouse button being pressed and if it returns true it generates 5 particles at the mouse position.