GenMoveSpriteY


GenMoveSpriteY sprite, yInc {, msDuration }

sprite

Sprite to move.

yInc

The distance to move in the y direction relative to the sprite's current location. If this number is negative the sprite will move up. If positive, the sprite will move down.

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