Sets the order in which new particles are drawn.


part_system_draw_order(ind, oldtonew);

Argument Description
ind The index of the particle system to change.
oldtonew Whether old particles should be drawn behind newer ones (true) or vice versa (false).

Returns: N/A


With this function you can set the way in which particles are drawn when created on the screen. The default system uses an old>new look (the function is set to true), where old particles are drawn at a higher depth than newer ones and so appear "beneath" them new particles, but by setting this function to false you can reverse this order and have the new particles drawn higher and so appear "beneath" the older ones. The images below illustrate this, with the image on the left being the default value of true and the image on the right being false:

NOTE: When the particles are being drawn with an additive blend mode, the effect of this function may not always be obvious.


mysystem = part_system_create();
part_system_clear( mysystem, 1 );

This will create a new particle system with the index mysystem. It will then set its particles to draw newer particles atop older ones.

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