part_system_destroy

Destroys an existing given particle system and any emitters it carries.

Syntax:

part_system_destroy(ind);


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


Returns: N/A


Description

With this function you can destroy a given particles system and remove it from memory. This should always be called when the system is no longer needed, like at the end of a room, or in the destroy event of an instance, otherwise you could end up with particles appearing in later rooms and no way to remove them as well as a memory leak which will eventually crash your game.

NOTE: This function will also destroy and remove any emitters that may have been created and associated with the system being destroyed.


Example:

mysystem = part_system_create();
part_system_destroy( mysystem );

This will create a new particle system with the index mysystem. It will then destroy it.


Back: Particle Systems
Next: part_particles_clear
© Copyright YoYo Games Ltd. 2015 All Rights Reserved