How would I make an ingame tutorial??

Hello, I’m trying to make a tutorial in game. One that explains how to work the basics of the game. I want it to stop the game when the character reaches a certain point and have some text come up telling what to do and then start again when the player hits a button on the keyboard. Right now I’m trying to use a case switch but I’m not sure if that will work. Here’s what I have so far:

using UnityEngine;
using System.Collections;

public class Tutorial : MonoBehaviour 
{
	
	int tut_state;
	
	const int state_1 = 1;
	const int state_2 = 2;
	const int state_3 = 3;
	const int state_4 = 4;
	const int state_5 = 5;
	const int state_6 = 6;
	const int state_7 = 7;
	const int state_8 = 8;
	
	string display_text;
	
	public string welcome;
	public string moving;
	public string pickUps;
	public string shooting;
	public string doors;
	public string floating;
	public string state7;
	public string state8;
	
	
	private bool beginTut = false;
	private bool endTut = false
		;
	
	bool showGUI = false;
	
	Rect display_box = new Rect(0,0, 200,200);
	// Use this for initialization
	void Start () 
	{

	}
	
	void OnTriggerEnter()
	{
		if(!endTut)
		{
			
			beginTut = true;
			showGUI = true;
			
		}
		
	}
	
	// Update is called once per frame
	void Update () 
	{
		
		if(!endTut && beginTut)
		{
			Time.timeScale = 0;
		}
		if(endTut)
		{
			Time.timeScale = 1;
			showGUI = false;
		}
	
	}
	
	void OnGUI()
	{
		switch(tut_state)
		{
		case state_1:
			display_text = welcome;
			break;
		case state_2:
			display_text = moving;
			break;
		case state_3:
			display_text = pickUps;
			break;
		case state_4:
			display_text = shooting;
			break;
		case state_5:
			display_text = doors;
			break;
		case state_6:
			display_text = floating;
			break;
		case state_7:
			display_text = state7;
			break;
		case state_8:
			display_text = state8;
			break;				
		}
			
		GUI.Label(display_box, display_text);
		
		if(Input.GetKeyDown(KeyCode.B))
		{
			tut_state++;
		}
	}
}

Any help would be appreciated! Thanks!!

for the when a player reaches a certain point what your going to want to do is.

create an empty game object.

Add a box collider.

check the is trigger checkmark in the properties.

now your collider is a trigger box. whenever anything enters the bounds it will send a

OnTriggerEnter call and give you the collider that hit it. so

attach a script to this empty trigger object

OnTriggerEnter(collider Player)
{
//first confirm it is in fact the player
if(Player.tag == "player") 
{
//display text box
}
}

there you go they got to a point and text popped up

your switch method is an acceptable way to change up the text displayed I don’t see anything wrong with it. (it’s not how i’d do it, but everyone has there own methods and your method is perfectly good)

That helps and while I don’t get any errors it won’t display any of the text when I walk into the box collider.

	void OnTriggerEnter(Collider other)
	{
		
		if(other.gameObject.tag == "Player")
		{
			GUI.Label(display_box, display_text);
		}
		
		switch(other.gameObject.tag)
		{
		case "Tutorial1":
			display_text = walking;
			break;
		case "Tutorial2":
			display_text = shooting;
			break;
		case "Tutorial3":
			display_text = pickUps;
			break;
		case "Tutorial4":
			display_text = doors;
			break;
		case "Tutorial5":
			display_text = floating;
			break;
		/*case state_6:
			display_text = state6;
			break;
		case state_7:
			display_text = state7;
			break;
		case state_8:
			display_text = state8;
			break;*/				
		}
		Destroy(gameObject);
		
	}

Putting the == "Player in the switch statement gives me errors saying that I can’t convert a string to a bool so I don’t have it in there. I know I’m doing probably a couple things wrong but can’t figure out what.

You could use a video if your a unity pro user or you could have images and gui text telling you what to do. If your desperate to use a video and your an indie user try getting a indie video asset converter thing.

Video unity lite stuff