Fandom

Game Maker

Jump to a given position

279pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Jump to given position

This action's popup window

Using Jump to a given position you can place the instance in a particular position. You simply specify the X coordinate and Y coordinate, and the instance is placed with its reference point on that position. If you check the Relative box, the position is relative to the current position of the instance. This action is often used to continuously move an instance. In each step we increment the position a bit.

If you would jump to another object, X and Y are the name from the other object + .X or .Y, example:

obj_name.x

obj_name.y

Example: instance_create(obj_wood.x,obj_wood.y,obj_woodlover);

This will summon object obj_woodlover on obj_wood's X and Y points.

action_move_to Edit

The action_move_to(x_coord,y_coord) function does this in a piece of code.

action_set_relative(1);
action_move_to(0,-5); //move upwards

See Also Edit

Also on Fandom

Random Wiki