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.

can check whether a mouse button is pressed and, if so, for example move to that position<br />

(use the jump to a point action <strong>with</strong> values mouse_x and mouse_y).<br />

Check Grid<br />

Returns true if the position of the instance lies on a grid. You specify the horizontal and<br />

vertical spacing of the grid. This is very useful when certain actions, like making a turn, are<br />

only a llowed when the instance is on a grid position.<br />

Start Block<br />

Indicates the start of a block of actions.<br />

End Block<br />

Indicates the end of a block of actions.<br />

Else<br />

Behind this action the else part follows, that is executed when the result of the question is<br />

false.<br />

Repeat<br />

This action is used to repeat the next action (or block of actions) a number of times. You<br />

simply indicate the number.<br />

Exit Event<br />

When this action is encountered no further actions in this event are executed. This is typically<br />

used after a question. For example, when a position is free nothing needs to be done so we<br />

exit the event. In this example, the following actions are only executed when there is a<br />

collision.<br />

If you want more control over what is happening in the game you can use the built-in<br />

programming language that is described on part 4 of the documentation. If gives you much<br />

more flexibility than using the action. Simpler use but also important involves the use of your<br />

own variables. The following actions deal <strong>with</strong> this.<br />

Execute Code<br />

When you add this action, a form shows in which you can type in a piece of code which must<br />

be execute. This can contain simple function calls or more complex code. Use the code action

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

Saved successfully!

Ooh no, something went wrong!