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.

instance is visible!) The following drawing actions are available. These actions only make<br />

sense in the drawing event. At other places they are basically ignored.<br />

Draw Sprite<br />

You specify the sprite, the position (either absolute or relative to the current instance position)<br />

and the subimage of the sprite. (The subimages are numbered from 0 upwards.) If you want<br />

to draw the current subimage, use number -1.<br />

Draw Background<br />

You indicate the background image, the position (absolute or relative) and whether the image<br />

should be tiled all over the room or not.<br />

Draw Text<br />

You specify the text and the position. A # symbol in the text is interpreted as going to a new<br />

line. (Use \# to get the # symbol itself.) So you can create multi-line texts. If the text starts<br />

<strong>with</strong> a quote or a double quote, it is interpreted as an expression. For example, you can use<br />

'X: ' + string(x)<br />

to display the value of the x-coordinate of the instance. (The variable x stores the current x-<br />

coordinate. The function string() turns this number into a string. + combines the two<br />

strings.)<br />

Draw Scaled Text<br />

This action is similar to the previous action but this time you can also specify a horizontal and<br />

vertical scaling factor to change the size of the text and you can specify an angle to rotate it.<br />

This action is only available in the Pro Edition.<br />

Draw Rectangle<br />

You specify the coordinates of the two opposite corners of the rectangle; either absolute or<br />

relative to the current instance position.<br />

Horizontal Gradient<br />

This action also draws a rectangle but this time using a gradient color that changes from left

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

Saved successfully!

Ooh no, something went wrong!