Novice wrote:This would make a simple AI, put this in draw actor of the CPU paddle.
- Code: Select all
if (x>ball.x) x-=2;//this checks if the paddle is farther left than the ball and turns it back
else if (x<ball.x) x+=2;//this does the oposite
Thanks Novice it works just fine
... although the paddle does act a little "shaky" ..
I have linked to at win32 exe of my game. see for yourself.
Now I have some other problems with my game..
Problem number 1: Physical response....
My ball act very weird. When i launch it, it sometimes bounces as a ball should.. other times it just "crawls" along side the wall.. what am I doing wrong? is it a bug or have I just configured it wrong?
My ball has the following events added to it:
Collision-->Level 1 (walls) (any side, Repeat event:yes, Event Actor only)
Collision-->Paddle_1 (any side, Repeat event:yes, Event Actor only)
Collision-->Paddle_2 (any side, Repeat event:yes, Event Actor only)
I have trid different variable settings in the physical response dialogue but with no luck. At the moment the physical response variables are set to default ( 1 )
any suggestions to whats wrong...
Problem number 2: Physical response....again!
I cant seem to get the ball to move at a constant speed, I assume this i related to the physical response problem.
Again I am a n00b at this so I maybe overlooking something very basic
Any suggestions are greatly appreciated.
regards
Effix
Game executable :
PaddleBattle Alpha
GE Data files (rar) :
PaddleBattle Alpha Source