I am creating a pong game and i want the other paddle to move by it self Why isnt this code working
if(dbSpriteY(ballID) > dbSpriteY(plr2) && dbSpriteCollision(plr2,10)== 0)
{
dbMoveSprite(plr2,3);
}
else
if(dbSpriteY(ballID) < dbSpriteY(plr2) && dbSpriteCollision(plr2,13)== 0)
{
dbMoveSprite(plr2,- 3 );
}
else
if(dbSpriteY(ballID) == dbSpriteY(plr2)&& dbSpriteCollision(plr2,10)== 0 && dbSpriteCollision(plr2,13)== 0 )
{
dbMoveSprite(plr2,0);
}
okay so the ball bounces off the paddle and the player is trying to get points by making the other player miss. i got every thing running fine i just want the other paddle to move by the computer and btw it can on move verically(up and down) so i was wondering y the paddle isnt moving by it self