08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Changers change certain particles when they appear in their region. A particle system can<br />

have an arbitrary number of changers. A changer has the following properties:<br />

• xmin, xmax, ymin, ymax indicates the extent of the region in which the particles<br />

are changed.<br />

• shape indicates the shape of the region. It can have the following values:<br />

o ps_shape_rectangle<br />

o ps_shape_ellipse<br />

o ps_shape_diamond<br />

• parttype1 indicates the particle type that is changed.<br />

• parttype2 indicates the particle type into which it is changed.<br />

• kind indicates the kind of changer. It can have the following values:<br />

o ps_change_motion only changes the motion parameters of the particle, not<br />

the color and shape or lifetime settings<br />

o ps_change_shape only changes the shape parameters like size and color and<br />

shape<br />

o ps_change_all changes all parameters, this basically means that the<br />

particle is destroyed and a new one of the new type is created.<br />

The following functions are available to set the properties of the changer. Note that each of<br />

them gets the index of the particle system to which it belongs as a first argument.<br />

part_changer_create(ps) Creates a new changer in the given particle<br />

system. It returns the index of the changer. This index must be used in all<br />

calls below to set the properties of the changer.<br />

part_changer_destroy(ps,ind) Destroys changer ind in the particle<br />

system. Call this if you don't need it anymore to save space.<br />

part_changer_destroy_all(ps) Destroys all changers in the particle<br />

system that have been created.<br />

part_changer_exists(ps,ind) Returns whether the indicated changer<br />

exists in the particle system.<br />

part_changer_clear(ps,ind) Clears the changer ind to its default<br />

settings.<br />

part_changer_region(ps,ind,xmin,xmax,ymin,ymax,shape) Sets the<br />

region for the changer.<br />

part_changer_types(ps,ind,parttype1,parttype2) Sets which

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!