part_type_life

Sets a particle type's lifespan in steps.

Syntax:

GML Code Example

part_type_life(ind, life_min, life_max);


Argument Description
ind The index of the particle type to change.
life_min The minimum lifespan of the particles.
life_max The maximum lifespan of the particles.


Returns: N/A


Description

This is the function that governs how long each individual particle of the indicated type remains on the screen. As with other particle functions, you provide a minimum and a maximum value (in steps)and each particle lifespan will be a random number of steps from within the specified range. To have all particles with the same lifetime, set the two values to be the same.


Example:

GML Code Example

part_type_life(part_Flare, room_speed, room_speed * 2);

The above code will set all particles created of the particle type indexed in the variable "part_Flare" to have a lifetime of between 1 and 2 seconds, based on the current room-speed.





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