part_particles_create

Create particles from a system at a given position.

Syntax:

GML Code Example

part_particles_create(ind, x, y, parttype, 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.
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. Note that you must have created the particle system and the particle type previously for this function to be used.


Example:

GML Code 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.





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