Movement (Game Maker)

Game Maker has a few variables dedicated to helping you move instances around and keep track of where they currently are. This page lists these variables for you.

Keeping Track of An Instance's Location, and Teleporting

Actions

GML

  • x - the horizontal location of an instance
  • y - the vertical location of an instance.
  • xstart - the starting x location of an instance.
  • ystart - the starting y location of an instance.

Indirectly Moving an Instance

Speed and Direction

Actions
GML
  • direction - the current direction an instance is moving (if it is moving, see speed.
  • hspeed - the horizontal speed of an instance.
  • speed - the overall speed of an instance.
  • vspeed - the vertical speed of an instance.

Gravity

  • gravity - the acceleration of gravity on a game object.
  • gravity direction - the direction of gravity on a game object.

Movement Checking / Planning

Collisions

Distance

Grid Movement

FAQs

page revision: 19, last edited: 05 Jul 2012 18:15
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /