part_system_update

Updates the positions of the particles in a given system.

Syntax:

part_system_update(ind);


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


Returns: N/A


Description

This function will advance the given particle system one step in game time and can be used to simulate the particle system behaviour when automatic updating is off, or it can be used to advance a particle system to a specific point all in one step. For example, if you have a particle system for snow, and you want it to appear that the snow is falling right from the moment the player enters the room then you may wish to advance your snow particles for a few seconds in the create event of an instance so that the first time they are drawn, there are particles all over the screen (the code example below shows this). You can also use this function when automatic updating of the system is switched off by the function part_system_automatic_update to move the system along.


Example:

repeat (room_speed * 3)
   {
   part_system_update(global.RainSys);
   }

The above code will advance the particle system indexed in the global variable "RainSys" by 3 seconds.


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