Disable MouseLook for dialogues

I've got the Kimmons dialogue generator and when the dialogue pops up its really hard to make a choice without moving the camera view around a lot, which sometimes causes the dialogue to end. How can I make it so that mouseLook is disabled when the dialogue is triggered, and enabled when the dialogue is ended? Thanks!

Make a static variable:

Static var Dialog : Boolean = false;

Then put this inside your update function:

if(Dialog){            
      GameObject.Find("First Person Controller").GetComponent("MouseLook").enabled = false;            
      GameObject.Find("Main Camera").GetComponent("MouseLook").enabled = false;      
}

Keep in mind that this will only disable the MouseLook. To re-enable it use the same idea in reverse with a different If statement. I.E.

if(!Dialog){
      GameObject.Find("First Person Controller").GetComponent("MouseLook").enabled = true; 
      GameObject.Find("Main Camera").GetComponent("MouseLook").enabled = true;      
}

Then all you have to do if you want to initiate a dialog, just put

"Whatever object you put the above scipt onto".Dialog = true;

Put an 'if' statement around the mouse look code which checks if the dialog is being displayed.