part_system_update

Updates the positions of the particles in a given system.

Syntax:

GML Code Example

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:

GML Code 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.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here