Couple questions on GUI.Lable and on Game controls

Sorry ahead of time for the many questions I might post, the scripting in Unity is completely different from what I have learned from XNA 3.0, it was the last time I was actually into coding and scripting for games but lost interest since the stuff never worked.

Currently in the game I am working on with 2 of my friends I have a small GUI.Lable message going for dialog given by the character that you play through a timer setup. And when the player gets to the object how do I trigger a event when the character that you play do a different set of text given over time? Like for example I have the main character say a few lines saying that they hope that the foul beast does not find them. Now When the player goes up to this object that seems very out of place I want the character to say something like this when they get close to it: I wonder what this object does? but ONLY when they get near the object.

For the next question, if I setup a script like this:

using UnityEngine;
using System.Collections;

public class TimedMessages : MonoBehaviour
{
	public float TextDisplay = 0;
	public float TextDisplay2 = 0;
	public float TextDisplay3 = 0;
	
	void OnGUI()
	{
		if(TextDisplay < 10)
		{
			GUI.Label(new Rect(((Screen.width / 2) - 90),((Screen.height /2) + 300),300,25),"I hope that Foul Beast is gone....");
		}
		if(TextDisplay2 < 20 && TextDisplay2 > 11)
		{
			GUI.Label(new Rect(((Screen.width / 2) - 100),((Screen.height /2) + 300),300,25),"If not I do not know what to do to escape it....");
		}
		if(TextDisplay3 < 30 && TextDisplay3 > 21)
		{
			GUI.Label(new Rect(((Screen.width / 2) - 90),((Screen.height /2) + 300),300,25),"Lets hope for the best...");
		}
	}
	// Update is called once per frame
	void Update()
	{
		TextDisplay += Time.deltaTime;
		TextDisplay2 += Time.deltaTime;
		TextDisplay3 += Time.deltaTime;
	}
}

What would I do to start a Audiofile right when the text shows up?

(Not sure if the code goes into a code box I click the button but it doesnt show up in the Preview D:)

Now for the last question, What would I do to change the default controls for the game and the name for the control settings? Apparently going to Edit => Project Settings => Input does not do what I thought it was for and when I rename the input to something else it just bugs it out and makes it unusable.

Again I am very sorry for the long question still trying to get familiarized back into game development and learning how Unity works.

Well your first question solution… i am takeing the scenario of your example where when the player get in close to the object, you want a text displayed and also an audio played.what you need to do is, tag your object say ‘log’ then do raycasting, if your ray hit the log then display the text and play the audio.your audio souce is supposed to be attached to the log.

 private bool log;
        private bool beast;
        private bool hopeBest;
    
        void OnGUI()
        {
           if(log)
           {
             GUI.Label(new Rect(((Screen.width / 2) - 90),((Screen.height /2) + 300),300,25),"I hope that Foul Beast is gone....");
           }
           if(beast)
           {
             GUI.Label(new Rect(((Screen.width / 2) - 100),((Screen.height /2) + 300),300,25),"If not I do not know what to do to escape it....");
           }
           if(hopeBest)
           {
             GUI.Label(new Rect(((Screen.width / 2) - 90),((Screen.height /2) + 300),300,25),"Lets hope for the best...");
           }
        }
  void  update() 
     {
      RaycastHit hit;
           if (Physics.Raycast(transform.position, -Vector3.up, out hit, 100.0F))
             {
               if(hit.transform.tag == "log")
               {   // ur in 100 meters of the object
                    log = true; 
                    hit.transform.audio.Play();
              }
              else  if(hit.transform.tag == "beast")
               {   // ur in 100 meters of the object
                    beast = true; 
                    hit.transform.audio.Play();
              }
              else  if(hit.transform.tag == "hope")
               {   // ur in 100 meters of the object
                    hopeBest = true; 
                    hit.transform.audio.Play();
              }
            }
    } `

second question: say your audio source is attached to the log, then in script
public Gameobject log;

log.audio.Play();

third question: Edit => Project Settings => Input => Axes… say you want to use left shift for jump… the default is ‘space’… so in the positive button change ‘space’ to ‘left shift’… check out the keycode in unity for more button names used in unity . Unity - Scripting API: KeyCode