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.

There are a number of actions <strong>with</strong> which you can control which other actions are performed.<br />

Most of these actions ask a question, for example whether a position is empty. When the<br />

answer is yes (true) the next action is executed, otherwise it is skipped. If you want multiple<br />

actions to be executed or skipped based on the outcome you can put them in a block by<br />

putting start block and end block actions around them. There can also be an else part which is<br />

executed when the answer is no. So a question typically looks as follows:<br />

Here the question is asked whether a position for the current instance is collision free. If so,<br />

the instance starts moving in a given direction. If not, the instance jumps to a given position.<br />

For all questions there is a field labeled NOT. If you check this field, the result of the question<br />

is reversed. That is, if the result was true it becomes false and if it was false, it becomes true.<br />

This allows you to perform certain actions when a question is not true.<br />

For many questions you can indicate that they should apply to all instances of a particular<br />

object. In this case the result is true only if it is true for all instances of the object. For<br />

example, you can check whether for all balls the position slightly to the right is collision free.<br />

The following questions and related actions are available. (Note that they all have a differently<br />

shaped icon and a different background color so that they can more easily be distinguished<br />

from other actions.)<br />

Check Empty<br />

This question returns true if the current instance, placed at the indicated position does not<br />

generate a collision <strong>with</strong> an object. You can specify the position as either absolute or relative.<br />

You can also indicate whether only solid, or all objects, should be taken into account. This<br />

action is typically used to check whether the instance can move to a particular position.

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

Saved successfully!

Ooh no, something went wrong!