Move Object One Spot Over

How would you make an object move 1 in a direction slowly but as it was moving not let you move in a diferetn direction till it reaches the the position that is one in that direction.(Trying to make grid based moment)
I have this so far

		if (Input.GetButton ("y") ||Input.GetAxis("upd") > 0){ //|| Input.GetAxis("stickup") < 0) {
  
  GameObject.Find("MovePoint").transform.position.z += 1;
	
	 //moves object forward
	 
	}
		else if ( Input.GetButton ("a") ||Input.GetAxis("upd") < 0){ //|| Input.GetAxis("stickup") > 0){
      GameObject.Find("MovePoint").transform.position.z -= 1;
	//move down
	
	}
		else if ( Input.GetButton ("b") ||Input.GetAxis("lrd") > 0 ){//|| Input.GetAxis("stickl") > 0){
    //move right
	GameObject.Find("MovePoint").transform.position.x += 1;
	
	
	}
else if ( Input.GetButton ("x") ||Input.GetAxis("lrd") < 0 ){//|| Input.GetAxis("stickl") < 0){
  GameObject.Find("MovePoint").transform.position.x -= 1;
  //move left

 }	
	}

transform.position = Vector3.Lerp (transform.position, GameObject.Find("MovePoint").transform.position,Time.deltaTime * smooth);

This does work but it sends you flying in a direction if the button is held down. I want you only to be abel to move again if you’ve got to your destination.

Try using a boolean flag to indicate if the object is moving or not. If it’s moving, then the player cant move it. If it’s not moving, then it must be in position, so the player can move it again.

Also have a look at the reference pages:
Input.GetButton
Input.GetButtonDown

There is a difference. GetButton and GetKey will give you continuous input if the player holds the button down.

Wait… Which one wont? Be continous?

Follow the links. They each tell you within the first couple lines of text. The explanations are given in the context of people writing games, so it’s really easy to understand.