next time, please don't put sooooooooooooooooooo cccccccoooooonnnn... just put so confused. anyways, for the computer, put
forever
|if #ofpeopleplaying=1
||go to [x: x position, y: y position of ball]
---------
look at this: My Pong Project
Offline
OR...
_________________________
See my project Paddleball v2
Last edited by GraemeK (2010-10-22 16:57:17)
Offline
aka:
<when green flag clicked>
<forever>
<set y to( ([Y position] of [ball])
<end>
Offline
ummm... guys, who wants to play pong vs. an unbeatable AI? that's no fun.
try this.
[blocks]
<if><( y of ball <>> y of CPU )>
<change y by( 3)
<end>
[/blocks]
and the opposite for if ball < CPU
hope this helps!
Offline
16Skittles wrote:
ummm... guys, who wants to play pong vs. an unbeatable AI? that's no fun.
try this.
[blocks]
<if><( y of ball <>> y of CPU )>
<change y by( 3)
<end>
[/blocks]
and the opposite for if ball < CPU
hope this helps!![]()
The full script would look like this:
Last edited by HD123 (2010-10-22 18:50:58)
Offline
yup! that looks about right!
the problem with the first scripts is that it is physicaly impossible to score a single point.
Offline