rabhishek21
Disciple
i'm trying to move a sprite in dark gdk . the problem is code is not executing the condition to turn to the right direction . its continuously moving towards the left ....
here's the code :while ( LoopGDK ( ) )
{
dbSetSpriteFrame(1,2);
dbRotateSprite(1,270);
dbMoveSprite(1,4);
dbRotateSprite(1,0);
int i = dbSpriteX(1);
if(i == 50 ){
dbFlipSprite(1);
dbRotateSprite(1,90);
dbMoveSprite(1,4);
dbRotateSprite(1,0);
}
here's the code :while ( LoopGDK ( ) )
{
dbSetSpriteFrame(1,2);
dbRotateSprite(1,270);
dbMoveSprite(1,4);
dbRotateSprite(1,0);
int i = dbSpriteX(1);
if(i == 50 ){
dbFlipSprite(1);
dbRotateSprite(1,90);
dbMoveSprite(1,4);
dbRotateSprite(1,0);
}