Sets a particle type's lifespan in steps.


part_type_life(ind, life_min, life_max);

参数 描述
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.

返回: N/A(无返回值)


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.


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.

上一页: Particle Types
下一页: part_type_step
© Copyright YoYo Games Ltd. 2018 All Rights Reserved