part_system_automatic_draw

Sets whether or not the particles in the particle system should be automatically drawn or not.

Syntax:

part_system_automatic_draw(ind, automatic);


Argument Description
ind The index of the particle system to change.
automatic Whether automatic drawing is on (true) or not (false).


Returns: N/A


Description

This function can be used to switch off the drawing of a particle system so that any updates done to the system (automatic or otherwise) will not be seen. This is a purely visual option and when set to false you will not be able to see the particles as they are not drawn, but they still exists and are changing position, colour etc... as they would normally. When automatic drawing is off, you can explicitly order GameMaker: Studio to draw the current state of the particle system using the function part_system_drawit, and if you set this function to true again you can switch automatic drawing back on.

One thing to note is that if you are using the simple effects created by the functions effect_create_above or effect_create_below then you can use the values of 0 (for below effects) or 1 (for above effects) as the particle system index and so toggle the automatic draw for these too (this will also work to toggle drawing for the D'n'D particle effects).


Example:

part_system_automatic_draw(global.Sname, false);

The above code switches off automatic drawing for the particle system indexed in the global variable "Sname".


Back: Particle Systems
Next: part_system_update
© Copyright YoYo Games Ltd. 2018 All Rights Reserved