There are lots of ways to do that.
A simple one is to use the moveto command with a bit of rand() inserted
- Code: Select all
MoveTo("Event Actor", x, ball.y+(rand(40)-20), speed, "Game Center", "");
Triggered at intervals.
However, I'm sorry to say, that not many people play pong these days. Consider how much similiar yet way more fun Super Dodgeball was (and that was made in like, 1986!). Tons of tennis, volleyball, and dogeball games exist which are the same thing, but way more complex and way better looking.
You can still make pong. Just do something different and fun with it. Give the ball a tracer.
Create an actor called ball2 or whatever. Give it the same animation as ball. In its draw actor, write this:
- Code: Select all
transp+=.02;
if(transp>.9){
DestroyActor("Event Actor");
}
Create an integer variable. Call it whatever.
Then on the main ball, in draw actor, put this:
- Code: Select all
whatever++;
if(whatever==5){
CreateActor("ball2", "ball", "no parent", "no path", 0, 0, true);
whatever=0;
}
Now your ball leaves trails. Try making the ball explode sometimes. Or the ball changes from a ball to a snowball to a blob of gak. Or maybe the ball is a cute little animal that gets painfully bounced around (i. e. the puppy bouncing scene from Earthworm Jim). If you do something original and fun, people will play your game.