hey guys :)
iv turned the Mouse Look and Character Motor scripts off, but i can still look up and down.
iv cut out the unimportant stuff but heres what im using:
var IsPaused : boolean = false;
function Start()
{
Screen.showCursor = false;
};
function Update()
{
if (Input.GetKeyDown ("escape")){
if (IsPaused == true){
IsPaused = false;
Time.timeScale = 1.0;
Screen.showCursor = false;
}
else{
IsPaused = true;
Time.timeScale = 0.00001;
Screen.showCursor = true;
};
};
};
function OnGUI()
{
if (IsPaused == true){
var ResumeButton : boolean = GUI.Button(Rect(Screen.width/2, Screen.height/2, 175, 20), "Resume Game");
var VisitWebsite : boolean = GUI.Button(Rect(Screen.width/2, Screen.height/2 + 25, 175, 20), "Visit the Website");
var QuitButton : boolean = GUI.Button(Rect(Screen.width/2, Screen.height/2 + 25 + 25, 175, 20), "Exit");
GameObject.Find('Player').GetComponent('MouseLook').enabled = false;
GameObject.Find('Player').GetComponent('CharacterMotor').enabled = false;
if (QuitButton){
Application.Quit();
};
if (ResumeButton){
IsPaused = false;
Time.timeScale = 1.0;
Screen.showCursor = false;
};
if (VisitWebsite){
Application.OpenURL("www.google.com");
};
}
else{
GameObject.Find('Player').GetComponent('MouseLook').enabled = true;
GameObject.Find('Player').GetComponent('CharacterMotor').enabled = true;
return;
};
};
also the timescale does absolutly shit all (excuse the language) but every time i ask how to make a pause menu people always say to use timescale and it does absolutly nothing for me.
but this is pretty much a work around and i know it works.
the character cant move at all and you cant look around, the game still goes on so it isnt pausing really..its more for my interactives.
thing is, you can still look up and down and i dont know why. i tried unticking every script and it still does it.
help please :S?