Is it a bug?

Hello i have a problem with Unity 4.0.0 . When i play the AngryBots project or even when i make my own char with simple walking script it automatically walk with pressing any button. I try uninstall the unity, i try with older unity, i delete even from registry, still the same thing. Why, is it a bug, am i doing something wrong?

var speed = 6.0;  
 
var jumpSpeed = 8.0;   

var gravity = 20.0;   


private var moveDirection = Vector3.zero;   

private var grounded : boolean = false;   


function FixedUpdate() {   

if (grounded) {   

// We are grounded, so recalculate movedirection directly from axes   

moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, 0);   

moveDirection = transform.TransformDirection(moveDirection);   

moveDirection *= speed;  


if (Input.GetButton ("Jump")) {  

moveDirection.y = jumpSpeed;   

}  
 
} // Apply gravity   

moveDirection.y -= gravity * Time.deltaTime;  


// Move the controller   

var controller : CharacterController = GetComponent(CharacterController);  

var flags = controller.Move(moveDirection * Time.deltaTime);  
 
grounded = (flags & CollisionFlags.CollidedBelow) != 0;  

}   


@script RequireComponent(CharacterController)  

I am using this script for all my walking chars and it works, but now its walking automatically.

Please help, and thank you!

This happens because your script tells the character to move. You should edit the code like this

if(Input.GetKeyDown("x")){
moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, 0);   
 
moveDirection = transform.TransformDirection(moveDirection);   
 
moveDirection *= speed;}

This way, your character will move when you press X.