GenMoveSprite


GenMoveSprite sprite, distance, angle {, msDuration }

sprite

Sprite to move.

distance

Distance in pixels to move the sprite.

angle

The direction angle in degrees to move the sprite.

msDuration

If this optional parameter is not specified the move will be instantaneous. If a duration is specified, in milliseconds, the move 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 sprite angle and orientation. Sprites rotate in a clockwise direction. The rotation angle shown below is also the direction angle.


SetOnGenSpriteModifierSub


Game Engine Overview






Become a Patron