physics_particle_count

Retrieve the number of particles currently active in a physics simulation.

Syntax:

physics_particle_count()


Returns: Real


Description

This function will return the number of particles that are active in a physics enabled room.


Example:

if physics_particle_count() < physics_particle_get_max_count()
   {
   physics_particle_create(0, x, y, 0, 0, c_white, 1, 1)
   }

The above code will check to see if there are less than the maximum number of permitted particles in the room, and if so create one more.


Back: Soft Body Particles
Next: physics_particle_group_count
© Copyright YoYo Games Ltd. 2018 All Rights Reserved