GenMoveSpriteX sprite, xInc {, msDuration }


Sprite to move.


The distance to move in the x direction relative to the sprite's current location. If this number is negative the sprite will move left. If positive, the sprite will move right.


If this optional parameter is not specified the move will be instantaneous. If a duration is specified, in milliseconds, the sprite will take that amount of time to complete the move.

A collision will terminate the move.

Unless changed, the pivot point is the center of the sprite.

The sprite modifier event sub is called on completion of a move when msDuration is specified and greater than zero.

The diagram below shows the X and Y axis and their direction of movement.


Game Engine Overview

Become a Patron