So I want to be able to move to the next level of my game when I reach a particular object (in this case a simple cube) and I have not been able to create a script that will do this properly, If anybody can give me a script that would do this I would greatly appreciate it.
Hi buckethead3495,
i have a very simple line of code for u, that works well^^
function OnControllerColliderHit(hit:ControllerColliderHit){
// if the Finish is hit Load the Next Level
if(hit.gameObject.tag == "Finish") {
Application.LoadLevel(name of your level);
}
}
put this script on your character and the tag Finisch, on your game object what represent your goal^^
btw. the Tag is in your inspector
it is not the best script, because it only load 1 level^^ but u could tweak it.