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.

0 : stop the path<br />

1: continue from the start position (if the path is not closed we<br />

jump to the start position<br />

2: continue from the current position<br />

3: reverse the path, that is change the sign of the speed<br />

The argument absolute should be true or false. When true the absolute<br />

coordinates of the path are used. When false the path is relative to the current<br />

position of the instance. To be more precise, if the speed is positive, the start<br />

point of the path will be placed on the current position and the path is followed<br />

from there. When the speed is negative the end point of the path will be<br />

placed on the current position and the path is followed backwards from there.<br />

path_end() Ends the following of a path for the current instance.<br />

path_index* Index of the current path the instance follows. You cannot<br />

change this directly but must use the function above.<br />

path_position Position in the current path. 0 is the beginning of the path. 1<br />

is the end of the path. The value must lie between 0 and 1.<br />

path_positionprevious Previous position in the current path. This can be<br />

used e.g. in collision events to set the position on the path back to the<br />

previous position.<br />

path_speed Speed (in pixels per step) <strong>with</strong> which the path must be followed.<br />

Use a negative speed to move backwards.<br />

path_orientation Orientation (counter-clockwise) into which the path is<br />

performed. 0 is the normal orientation of the path.<br />

path_scale Scale of the path. Increase to make the path larger. 1 is the<br />

default value.<br />

path_endaction The action that must be performed at the end of the path.<br />

You can use the values indicated above.<br />

Motion planning<br />

Motion planning helps you to move certain instances from a given location to a different<br />

location while avoiding collisions <strong>with</strong> certain other instances (e.g. walls). Motion planning is a<br />

difficult problem. It is impossible to give general functions that will work properly in all<br />

situations. Also, computing collision free motions is a time-consuming operation. So you have

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

Saved successfully!

Ooh no, something went wrong!