GenMoveSpriteToY


GenMoveSpriteToY sprite, destY {, msDuration }

sprite

Sprite to move.

destY

The destination y coordinate for the move. At the end of the move the sprite's pivot point y will be positioned over destY. Unless changed, the pivot point is the center of the sprite.

msDuration

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.


SetOnGenSpriteModifierSub


Game Engine Overview






Become a Patron