i dont know how to make the opponents paddle block the ball
Posted: Sat Aug 04, 2007 12:48 pm
by pixelpoop
in the script editor on the draw event of the opponents paddle put:
if (ball_name.y<y){y-=1;}else{y+=1;}
change ball_name to the name of your ball actor.
change the 1 to whatever speed you want the opponents paddle to move.
Posted: Sat Aug 04, 2007 12:50 pm
by pixelpoop
you also need a physical responce on the ball if you don't have one already. Look under the Help menu for a tutorial.
Posted: Sat Aug 04, 2007 2:18 pm
by Freddy
I have the perfect thing for you. If you want you can just copy and paste this code to the draw actor event of the computer player.
int weight = 10;
x = ((weight -1)*x + Ball.x)/weight;
Change the 10 to a different number to adjust the speed of the opponent. You'll have to change the word Ball to whatever you called the ball in your game. Hope this helps .
Re: need help with pong game
Posted: Sun Aug 05, 2007 1:18 am
by Sgt. Sparky
your Icon is the Frog off of my Frogger Game.
Posted: Sun Aug 05, 2007 1:54 am
by d-soldier
You can't be sure, it could be any frog...
Re: need help with pong game
Posted: Sun Aug 05, 2007 9:42 pm
by jman
Sgt. Sparky wrote:your Icon is the Frog off of my Frogger Game.
srry
sgt. sparky
Posted: Sun Aug 05, 2007 9:44 pm
by jman
i like it
Posted: Mon Aug 06, 2007 1:59 am
by jman
thanks
Posted: Mon Aug 06, 2007 10:35 am
by jman
how do you make it so when a counter reaches 10 an "you win" comes to 0,0
on the screen
Posted: Mon Aug 06, 2007 11:56 am
by jman
how do you make it so when a counter reaches 10 an "you win" comes to 0,0
on the screen