- Home /
Editing the jumppad from the 3rd person tutorial
Hi, I've got the jumppad script from the 3rd person tutorial (from the unity3d site) but i need to edit it to work with my current scene. This is wat ive got now: - a simple plane - First Person Controller - JumpPad Trigger (with sphere collider)
This is the script:
var jumpHeight = 5.0;
function OnTriggerEnter (col : Collider) { var controller : FirstPersonController = col.GetComponent(FirstPersonController); if (controller != null) { if (audio) { audio.Play(); }
controller.SuperJump(jumpHeight);
}
}
// Auto setup the script and associated trigger. function Reset () { if (collider == null)
gameObject.AddComponent(BoxCollider); collider.isTrigger = true; }
@script RequireComponent(BoxCollider) @script AddComponentMenu("First Person Props/Jump pad")
I simply changed every Third Person to First Person, but im getting the error: BCE0018: The name 'FirstPersonController' does not denote a valid type ('not found').
Ive tried several things but i just cant figure it out, it must be some simple solution but I dont know the program that good. Any help is appreciated! Thanks!
Answer by Lucas Meijer 1 · Apr 18, 2011 at 05:36 PM
Hoi Casper,
The script you pasted above use FirstPersonController. The compileerror you see means that unity cannot find a script with that name.
Doei, Lucas
Answer by Casper · Apr 19, 2011 at 08:51 AM
Yes, I could figure that out, but a solution for it would be nice. In sorry but it didnt answer my question.
When i change FirstPersonController to First Person Controller, I get the error: UCE0001 Insert a semicolon at the end.
I still don't know how to figure this out. Is there anyone who knows to make this script working?
Thanks!
Your answer
Follow this Question
Related Questions
Insert a semicolon error 1 Answer
Scripting error: ';' expected. Insert a semicolon at the end. 2 Answers
doing force and spin on a gameobject when clicking on plane. 2 Answers
I can rotate but not move or I can move but not rotate, console messages. 0 Answers
UCE0001: ';' expected. Insert a semicolon at the end. 2 Answers