part_type_destroy

Destroys a given particle type.

Syntax:

GML Code Example

part_type_destroy(ind);


Argument Description
ind The index of the particle type to destroy.


Returns: N/A


Description

With this function you can remove the specified particle type from the game. When you use this function, all particles of the given type will disappear from the room and the particle itself is removed form memory, so this function should be used only when you no longer need the particle.


Example:

GML Code Example

if part_particles_count(smoke_sys) = 0
    {
    part_type_destroy(smoke_part);
    part_system_destroy(smoke_sys);
    instance_destroy();
    }
 else alarm[0] = 1;
 

The above code checks a particle system to see if any particles are currently visible in the room and if not, the particles, the system and the instance are 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