Well, if you want to make him a perfect, unbeatable CPU, Just say:
When Flag Clicked
Forever
Set Y to Y position of ball
If he needs to be beatable, try this:
When Flag Clicked
Forever
If
Y of ball is > y position
Change Y by 1 (Or whatever you want him to change by.)
Else
Change Y by -1 (Or whatever you want him to change by.)
Hope that helps!
Offline
Theres also the impossible.
When flagged clicked
forever
Change Y by (Variable)
When Flag clicked
repeat until (Variable)=(Some number lower than 240/-240)
Change (Variable) by Pick random 1 to 3.
Offline