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.

at the beginning of the animation or at a random place, etc. You use the following function for<br />

this.<br />

part_type_sprite(ind,sprite,animat,stretch,random) Sets your<br />

own sprite for the particle type. With animate you indicate whether the sprite<br />

should be animated (1) or not (0). With stretch (1 or 0) you indicate whether<br />

the animation must be stretched over the lifetime of the particle. And <strong>with</strong><br />

random (1 or 0) you can indicate whether a random subimage must be<br />

choosen as starting image.<br />

Once you have choosen the sprite for the particle type (either a default shape or your own)<br />

you can indicate the size of it. A size of 1 indicates the normal size of the sprite. A particle<br />

type can be defined such that all particles have the same size or have different sizes. You can<br />

indicate a range of sizes. Also, you can indicate whether the size should change over the<br />

lifetime of the particle and whether some wiggling in the size will happen, giving a blinking<br />

effect.<br />

part_type_size(ind,size_min,size_max,size_incr,size_wiggle)<br />

Sets the size parameters for the particle type. You specify the minimum<br />

starting size, the maximum starting size, the size increase in each step (use a<br />

negative number for a decrease in size) and the amount of wiggling. (The<br />

default size is 1 and default the size does not change.)<br />

part_type_scale(ind,xscale,yscale) Sets the horizontal and vertical<br />

scale. This factor is multiplied <strong>with</strong> the size. It is in particular useful when you<br />

need to scale differently in x- and y-direction.<br />

The particles also have an orientation. Again the orientation can be the same for all particles,<br />

can be different, and can change over the lifetime of the sprite. The angles specify counter-<br />

clockwise rotations, in degrees.<br />

part_type_orientation(ind,ang_min,ang_max,ang_incr,ang_wigg<br />

le,ang_relative) Sets the orientation angle properties for the particle<br />

type. You specify the minimum angle, the maximum angle, the increase in<br />

each step and the amount of wiggling in angle. (Default all values are 0.) You<br />

can also indicate whether the given angle should be relative (1) to the current<br />

direction of motion or absolute (0). E.g. by setting all values to 0 but

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

Saved successfully!

Ooh no, something went wrong!