physics_particle_group_end

Ends the definition of a particle group and creates it in the room.

Syntax:

physics_particle_group_end()


Returns: Real


Description

This function ends the definition of a particle group (which you should have begun using the function physics_particle_group_begin()), which in turn creates all the particles for the group within the game room. This function returns a unique ID value for the group just created which you can then store in a variable and use in other funtions.


Example:

var flags = phy_particle_flag_water | phy_particle_flag_viscous | phy_particle_flag_tensile;
var groupflags = phy_particle_group_flag_solid;
physics_particle_group_begin(flags, groupflags, mouse_x, mouse_y, 0, 0, 0, 0, c_white, 1, 1, 2);
physics_particle_group_circle(100);
mLastGroup = physics_particle_group_end();

The above code stores the flags for the particle type and the particle group properties in variables then uses these to create a circular particle group with a 100px radius at the mouse position. The ID for the group that has been created is stored in the variable "mLastGroup".


Back: Soft Body Particles
Next: physics_particle_group_join
© Copyright YoYo Games Ltd. 2019 All Rights Reserved