Alright guys, so I’m making a game. I want there to be a part where an air vent is pushing against the ball your controlling with your mouse. If you don’t get it, check out the swf file from megaswf.com. Trust me, it’s safe. No download needed. http://megaswf.com/serve/1008636
As you can see, I’ve got the idea. That’s what I want, the wind pushing the ball and you have to force yourself to push it forward with your arrow/mouse.
The only thing is there’s no variation.
I want as you get closer to the right side, the wind gets stronger, and the farther you get from the right side, the calmer the wind gets. Here’s some basic snipets of the code I used for the wind to react with the ball. This is not the entire code used in the swf.
//Here's the strength of the gravity.
gravity = 0.40;
ball.onEnterFrame = function() {
//there was some more code here that didn't really have anything to do with the wind.
xspeed -= gravity;
}
I would really appreciate it if you helped! Thanks!