Game Maker
Register
Advertisement
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[]

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[]

Advertisement