DbMoveSprite

This command moves a sprite a specified distance in the direction it is currently facing.

Syntax
dbMoveSprite( SpriteNumber, Velocity );

Usage
dbMoveSprite can be used to move a sprite along the direction it is facing. SpriteNumber is the ID number of the sprite you wish to move, and Velocity is the distance to move it. When a sprite is created, its default direction is north (towards the top of the screen). By using dbRotateSprite, the direction the sprite is facing may be changed. The next time dbMoveSprite is called, the sprite will move in its new direction.

For example:

dbMoveSprite( 1, 100 );

moves sprite number 1 forward in its current direction by 100 pixels, while

dbMoveSprite( 1, -100 );

moves it backwards.

Note that by using this command and dbRotateSprite together, you can easily create the movement for a 2D top down character.