Noob question.

I am very new to the game engine and so far have just been dabbling around with it, making questionable guesses on how to do what. I started out with the old cliche game with the little ball navigating itself around on a series of meshes. I have my camera in place, and its looking very nice, I made a more advanced looking character and now what I want to do is add some sort of… Attack.

To start out I just want a simple Sphere to charge forward when I press Left click. This was easily done, the problem is stopping the sphere. Is there something I can do to make the sphere stop moving after it moves a certain number of units after I press the left click button?

Just for info. Upon pressing left click the sphere will fire itself at a force of 5k, a camera is parented to the sphere, Q and E are used to rotate the sphere, WASD to move, and space to jump. The jump key is set on a collision sensor forcing the sphere to be touching a grounded object to jump.

How can I do what I wish to accomplish?

Check this tutorial: