X and Y coordinates
x the x-coordinate of the instance
y the y-coordinate of the instance
Example: if your play area was 640x480 pixels, you could test using the Step event whether the x coordinate was greater than 320. That would mean the object was in the right hand half of the screen. You could then choose to reverse the horizontal direction.

![]() |
|
Mouse Position
mouse_x x-position of the mouse
mouse_y y-position of the mouse
Example: you could use this to make an object move towards the mouse

Horizontal and Vertical Speed
hspeed the horizontal speed (in pixels per step)
vspeed the vertical speed (in pixels per step)
Example: you could use hspeed to set a maximum limit of 10 for an object's speed.

Scoring
score the current value of the score
lives the current number of lives
health the current health (0-100)
Direction
Direction the current direction of motion in degrees (0-360)
speed the current speed in this direction
Sprite Images
image_index this variable indicates which subimage in the current sprite is currently shown. If you change it and set the speed to 0 (see below) you can display a fixed subimage.
image_speed this variable indicates the speed with which the sub-images are shown. The default value is 1. If you make this value larger than 1 some sub-images are skipped to make the animation faster. If you make it smaller than 1 the animation becomes slower by repeating subimages.
There are plenty more variables that you can use in addition to
creating your own. Look up the Game Maker help for more
information about variables.


