Skip to content

motion_set

drewmccluskey edited this page Feb 10, 2019 · 2 revisions

motion_set

Sets a game objects direction and speed of movement

Syntax:

motion_set(dir, speed)
Argument Description
double dir Direction to move
double speed Speed to move

Returns: void

Description:

This function will move with your GameObject in given direction at given speed. Speed is measured as pixels per step or call.

Example:

motion_set(270, 5);

The above code will move the current GameObject downwards at a speed of 5 pixels per inch.

Back to Movement

Clone this wiki locally