• Create Account

### #Actualincertia

Posted 20 October 2012 - 09:18 PM

here is the code I am using

if(right_paddle>=-220)
{
}
{
}


If your paddle position is greater than -220, it's position will be set to -right_paddle_vel. I'm going to assume right_paddle_vel is less than 220, so it seems as if it will be stuck there.
Otherwise, we will keep moving it at a speed of right_paddle_vel.

Maybe you want to do this.

if(paddle_y > ball_y){
}
}


where vel is some positive number.

### #3incertia

Posted 20 October 2012 - 09:16 PM

here is the code I am using

if(right_paddle>=-220)
{
}
{
}


If it is at the bottom of the screen, it's position will be set to -right_paddle_vel.
Otherwise, we will keep moving it at a speed of right_paddle_vel.

Maybe you want to do this.

if(paddle_y > ball_y){
}
}


where vel is some positive number.

### #2incertia

Posted 20 October 2012 - 09:16 PM

here is the code I am using

if(right_paddle>=-220)
{
}
{
}


If it is at the bottom of the screen, it's position will be set to -right_paddle_vel.
Otherwise, we will keep moving it at a speed of right_paddle_vel.

Maybe you want to do this.

[code=auto:0]
}
}
[code=auto:0]

where vel is some positive number.

### #1incertia

Posted 20 October 2012 - 09:16 PM

here is the code I am using

if(right_paddle>=-220)
{
}
{
}