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.

You can change the way the mouse cursor looks like. You can choose any sprite for this. To<br />

this end you can use the following variable:<br />

cursor_sprite Indicates the sprite that is used to represent the cursor<br />

(default no sprite is used, represented by a value of -1). You can assign one of<br />

the sprites to this variable to have it been drawn automatically at the position<br />

of the mouse cursor. (You can also switch off the windows mouse cursor in the<br />

Global <strong>Game</strong> Settings.)<br />

The joystick<br />

There are some events associated <strong>with</strong> joysticks. But to have full control over the joysticks<br />

there is a whole set of functions to deal <strong>with</strong> joysticks. <strong>Game</strong> <strong>Maker</strong> supports up to two<br />

joysticks. So all of these functions take a joystick id as argument.<br />

joystick_exists(id) Returns whether joystick id (1 or 2) exists.<br />

joystick_name(id) Returns the name of the joystick<br />

joystick_axes(id) Returns the number of axes of the joystick.<br />

joystick_buttons(id) Returns the number of buttons of the joystick.<br />

joystick_has_pov(id) Returns whether the joystick has point-of-view<br />

capabilities.<br />

joystick_direction(id) Returns the keycode (vk_numpad1 to<br />

vk_numpad9) corresponding to the direction of joystick id (1 or 2).<br />

joystick_check_button(id,numb) Returns whether the joystick button is<br />

pressed (numb in the range 1-32).<br />

joystick_xpos(id) Returns the position (-1 to 1) of the x-axis of joystick<br />

id.<br />

joystick_ypos(id) Returns the joysticks y-position.<br />

joystick_zpos(id) Returns the joysticks z-position (if it has a z-axis).<br />

joystick_rpos(id) Returns the joysticks rudder position (or fourth axis).<br />

joystick_upos(id) Returns the joysticks u-position (or fifth axis).<br />

joystick_vpos(id) Returns the joysticks v-position (or sixth axis).<br />

joystick_pov(id) Returns the joysticks point-of view position. This is an<br />

angle between 0 and 360 degrees. 0 is forwards, 90 to the right, 180<br />

backwards and 270 to the left. When no point-of-view direction is pressed by<br />

the user -1 is returned.

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

Saved successfully!

Ooh no, something went wrong!