Destroyers

Game Maker 8

Destroyers

Destroyers destroy particles when they appear in their region. A particle system can have an arbitrary number of destroyers. A destroyer has the following properties:
  • xmin, xmax, ymin, ymax indicates the extent of the region in which the particles are destroyed.
  • shape indicates the shape of the region. It can have the following values:
    • ps_shape_rectangle
    • ps_shape_ellipse
    • ps_shape_diamond

The following functions are available to set the properties of the destroyers. Note that each of them gets the index of the particle system to which it belongs as a first argument.

part_destroyer_create(ps) Creates a new destroyer in the given particle system. It returns the index of the destroyer. This index must be used in all calls below to set the properties of the destroyer.
part_destroyer_destroy(ps,ind) Destroys destroyer ind in the particle system. Call this if you don't need it anymore to save space.
part_destroyer_destroy_all(ps) Destroys all destroyers in the particle system that have been created.
part_destroyer_exists(ps,ind) Returns whether the indicated destroyer exists in the particle system.
part_destroyer_clear(ps,ind) Clears the destroyer ind to its default settings.
part_destroyer_region(ps,ind,xmin,xmax,ymin,ymax,shape) Sets the region for the destroyer.