- Home /
How do you switch scenes? PLZ HELP!!!
How do you switch scene with your player when item is triggered PLZ HELP
"When item is triggered" is pretty vague, but you can call Application.LoadLevel() in a script to change levels.
I got an error that said It is not possible to invoke an expression of type 'int'
Answer by meat5000 · Nov 01, 2013 at 10:10 PM
Application.LoadLevel("LevelName");
Application.LoadLevel(index); // where index is an int
You must first enter the levels in the list in Build Settings.
And you actually have the scenes saved?
Post your script snippet in your question
Answer by Essential · Nov 01, 2013 at 07:55 PM
function OnTriggerEnter ( other : Collider )
{
if ( other.name == "Player" )
Application.LoadLevel("NameOfSceneToLoad");
}
Answer by el gamero · Nov 01, 2013 at 07:59 PM
Application.LoadLevel("");
I got an error that said It is not possible to invoke an expression of type 'int'
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to keep position of a Game Object when switching scene? 3 Answers
Calling a function after game over to retry 0 Answers
Change scenes from area? 1 Answer
Rays for movement?(C#) 0 Answers