UPDATE:
after about 3hrs of frustration i came up with this
void updateDragon()
{
int dragonX = dbSpriteX(DRAGON);
int dragonY = dbSpriteY(DRAGON);
int dragonint = dbRND(4);
switch (dragonint)
{
case 0:
dragonY--;
dbPlaySprite(DRAGON, DNORTH_START, DNORTH_END, DELAY);
dbSprite(DRAGON, dragonX, dragonY, DRAGON);
break;
case 1:
dragonY++;
dbPlaySprite(DRAGON, DSOUTH_START, DSOUTH_END, DELAY);
dbSprite(DRAGON, dragonX, dragonY, DRAGON);
break;
case 2:
dragonX--;
dbPlaySprite(DRAGON, DWEST_START, DWEST_END, DELAY);
dbSprite(DRAGON, dragonX, dragonY, DRAGON);
break;
case 3:
dragonX++;
dbPlaySprite(DRAGON, DEAST_START, DEAST_END, DELAY);
dbSprite(DRAGON, dragonX, dragonY, DRAGON);
break;
}
}
however the problem im having is it changes directions everytime the game loop updates...i would like the dragon to at least move in a straight line for x amount of time (or pixel) before changing directions...any help is appreciated