part_emitter_destroy

Destroys a given emitter in the given particle system.

Syntax:

GML Code Example

part_emitter_destroy( ps, ind );


Argument Description
ps The particle system to destroy the emitter from.
ind The index of the emitter to destroy.


Returns: N/A


Description

This function will remove the specified emitter from the given system and clear it from memory (this will also stop any particles from being produced by the given emitter, but it does NOT remove them from the room). This function should always be called when the given emitter is no longer needed for the system to prevent memory leaks and errors.


Example:

GML Code Example

if part_emitter_exists(global.Sname, p_emit)
    {
    part_emitter_destroy(global.Sname, p_emit1);
    }
 

The above code will check to see if the particle emitter indexed in the variable "p_emit" exists in the give particle system and if it does it is destroyed.





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