I searched everywhere and i never find an answer :
I want to disable the character motor (It’s right) and the MouseLook script (it’s wrong)(it’s called “SmoothMouseLook”) and everytime I get the error following :
“BCE0005: Unknow identifier: ‘SmoothMouseLook’”
How can I solve this ?
here’s my script :
var enterRP : boolean;
var enterWP : boolean;
var enter : boolean;
var enterPassword : boolean;
var Player : GameObject;
function OnTriggerEnter (other : Collider) {
if(other.gameObject.name == "Player"){
enter = true;
if(Input.GetKey(KeyCode.E)){
enterPassword = true;
Player.GetComponent(CharacterMotor).enabled = false;
Player.GetComponent(SmoothMouseLook).enabled = false;
}
}}
function OnTriggerExit (other : Collider) {
if(other.gameObject.name == "Player"){
enter = false;
}
}
function OnGUI(){
if(enter == true) {
GUI.Label (Rect(Screen.width / 2 - 150, Screen.height / 2 - 250, 150, 30), "[E] to enter password");
}
if(enterPassword == true){
// some other code line
}
}
I d’ont show all GUI code and the password codes but that are working
so I just want help for disabling the character motor and the SmoothMouseLook script.
Thanx.