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);

ArgumentTypeDescription
indParticle System InstanceThe index of the particle system.
xRealThe x coordinate of where to create the particles.
yRealThe y coordinate of where to create the particles.
parttypeParticle Type IDThe index (type) of the particles to be created.
numberRealThe 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.