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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

settings.<br />

part_attractor_position(ps,ind,x,y) Sets the position of attractor<br />

ind to (x,y).<br />

part_attractor_force(ps,ind,force,dist,kind,aditive) Sets the<br />

force parameters of attractor ind.<br />

Destroyers<br />

Destroyers destroy particles when they appear in their region. A particle system can have an<br />

arbitrary number of destroyers. A destroyer has the following properties:<br />

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

are destroyed.<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 />

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

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

part_destroyer_create(ps) Creates a new destroyer in the given particle<br />

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

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

part_destroyer_destroy(ps,ind) Destroys destroyer ind in the particle<br />

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

part_destroyer_destroy_all(ps) Destroys all destroyers in the particle<br />

system that have been created.<br />

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

destroyer exists in the particle system.<br />

part_destroyer_clear(ps,ind) Clears the destroyer ind to its default<br />

settings.<br />

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

the region for the destroyer.<br />

Deflectors

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

Saved successfully!

Ooh no, something went wrong!