Hour Range - Do Something?

UPDATE Mon. Dec. 2015 I updated my script. thanks to @BackslashOllie its a lot more streamlined now. The message centre Time Of Day greeting message Appears to be working now.

I also added another Good Bye Message for when the application is quit. So far this appears to be working also but maybe take a look and see that I am using the parts to the script correctly.

NOTE: I did notice experimenting that after the first startup greeting disappears after about 5 seconds based on the delay time specified that the Button State message for “Scanning” appears, don’t know why?

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class MessageCentreManager : MonoBehaviour {

	int sysHour = System.DateTime.Now.Hour; //gives you the current hour as an integer.

	//UI Text Reference
	public Text MessageCentreText;

	//Random Clips
	public AudioClip[] goodNightVoices;
	public AudioClip[] goodAfternoonVoices;
	
	//Button States
	public int buttonState = 0;
	bool GreetUser = true;

	void Awake ()
	{
		//StartCoroutine (ShowGreeting());
	}


	
	void Update ()
	{	 
		if (GreetUser) StartCoroutine(ShowGreeting());
		else if (buttonState == 1) MessageCentreText.text = "SCANNING";
		else if (buttonState == 2) MessageCentreText.text = "AUTO PHONE";
		else if (buttonState == 3)  MessageCentreText.text = "INT TEMP";
		else if (buttonState == 4) MessageCentreText.text = "LASER FIRE";
		else if (buttonState == 5) MessageCentreText.text = "TURBO MODE";
		else if (buttonState == 6) MessageCentreText.text = "OIL SLICK";
		else if (buttonState == 7) MessageCentreText.text = "AUTO SCAN";
		else if (buttonState == 8) MessageCentreText.text = "TRIP TIME";
		else if (buttonState == 9) MessageCentreText.text = "RADAR";
		else if (buttonState == 10) MessageCentreText.text = "CNTDWN TIMER";
		else if (buttonState == 11) MessageCentreText.text = "EXT MOVIE PLAYER";
		else if (buttonState == 12) MessageCentreText.text = "GRAPL HOOK LAUNCH";
		else if (buttonState == 13) MessageCentreText.text = "AUTO DOOR LFT";
		else if (buttonState == 14) MessageCentreText.text = "AUTO DOOR RHT";
		else if (buttonState == 15) MessageCentreText.text = "PENG";
		else if (buttonState == 16) MessageCentreText.text = "7DLA";
		else if (buttonState == 17) MessageCentreText.text = "6RM";
		else if (buttonState == 18) MessageCentreText.text = "FOG LHTS";
		else if (buttonState == 19) MessageCentreText.text = "HEAD LHTS";
		else if (buttonState == 20) MessageCentreText.text = "REAR HATCH";
		else if (buttonState == 21) MessageCentreText.text = "HIGH BEAMS";
		else if (buttonState == 22) MessageCentreText.text = "RHT WIN UP";
		else if (buttonState == 23) MessageCentreText.text = "RHT WIN DWN";
		else if (buttonState == 24) MessageCentreText.text = "LFT WIN UP";
		else if (buttonState == 25) MessageCentreText.text = "LFT WIN DWN";
	}
		

	IEnumerator ShowGreeting()
	{
		if (GreetUser) ShowGreeting();
		//Time OF Day Notification
		//Morning Time
		if (sysHour >= 01 && sysHour <= 12) {
			MessageCentreText.text = "GOOD MORNING";
			Debug.Log ("Good Morning!");
		}
		//Noon Time
		if (sysHour >= 12 && sysHour <= 18) {
			MessageCentreText.text = "GOOD AFTERNOON";
			Debug.Log ("Good Afternoon!");
		} 
		//Night Time
		if (sysHour >= 18 && sysHour <= 24) {
			MessageCentreText.text = "GOOD EVENING";
			Debug.Log ("Good Evening!");
		} 
		/*else {
			//Do something if desired
			MessageCentreText.text = "KNIGHT INDUSTRIES 2000";
			Debug.Log ("KNIGHT INDUSTRIES 2000");
		}*/
		yield return new WaitForSeconds(5); //Wait 5 seconds
		GreetUser = false;
	}

	
	
	//Scanner Button For Message
	public void GoScannerMessage()
	{
		buttonState = 1;
	}

	//Car Phone Button For Message
	public void GoAutoPhoneMessage()
	{
		buttonState = 2;
	}

	//Temperature Button For Message
	public void GoTemperatureMessage()
	{
		buttonState = 3;
	}

	//Laser Button For Message
	public void GoLaserMessage()
	{
		buttonState = 4;
	}

	//Turbo Boost Button For Message
	public void GoTurboBoostMessage()
	{
		buttonState = 5;
	}

	//Oil Slick Button For Message
	public void GoOilSlickMessage()
	{
		buttonState = 6;
	}

	//Surveillance Mode Button For Message
	public void GoSurveillanceModeMessage()
	{
		buttonState = 7;
	}

	//Trip Timere Button For Message
	public void GoTripTimerMessage()
	{
		buttonState = 8;
	}

	//Radar Button For Message
	public void GoRadarMessage()
	{
		buttonState = 9;
	}

	//Countdown Timer Button For Message
	public void GoCountdownTimerMessage()
	{
		buttonState = 10;
	}

	//Movie Player Button For Message
	public void GoMoviePlayerMessage()
	{
		buttonState = 11;
	}

	//Grappling Hook Button For Message
	public void GoGrapplingHookMessage()
	{
		buttonState = 12;
	}

	//Auto Door Left Button For Message
	public void GoAutoDoorLeftMessage()
	{
		buttonState = 13;
	}

	//Auto Door Right Button For Message
	public void GoAutoDoorRightMessage()
	{
		buttonState = 14;
	}

	//PENG Button For Message
	public void GoPENGButtonMessage()
	{
		buttonState = 15;
	}

	//7DLA Button For Message
	public void Go7DLAButtonMessage()
	{
		buttonState = 16;
	}

	//6RM Button For Message
	public void Go6RMButtonMessage()
	{
		buttonState = 17;
	}

	//Fog Lights Button For Message
	public void GoFogLightsButtonMessage()
	{
		buttonState = 18;
	}

	//Head Lights Button For Message
	public void GoHeadLightsButtonMessage()
	{
		buttonState = 19;
	}

	//Rear Hatch Button For Message
	public void GoRearHatchButtonMessage()
	{
		buttonState = 20;
	}

	//High Beams Button For Message
	public void GoHighBeamsButtonMessage()
	{
		buttonState = 21;
	}

	//Right Window Up Button For Message
	public void GoRwinUpButtonMessage()
	{
		buttonState = 22;
	}

	//Right Window Down Button For Message
	public void GoRwinDwnButtonMessage()
	{
		buttonState = 23;
	}

	//Left Window Up Button For Message
	public void GoLwinUpButtonMessage()
	{
		buttonState = 24;
	}

	//Left Window Down Button For Message
	public void GoLwinDwnButtonMessage()
	{
		buttonState = 25;
	}

	//Application Quit Button
	public void  GoQuitApplication(){
		StartCoroutine(LoadQ1());

	}

	IEnumerator LoadQ1(){
		GreetUser = true;
		//Time OF Day Notification
		//Morning Time
		if (sysHour >= 01 && sysHour <= 12) {
			MessageCentreText.text = "HAVE A NICE DAY";
			Debug.Log ("Have a Nice Day!");
		}
		//Noon Time
		if (sysHour >= 12 && sysHour <= 18) {
			MessageCentreText.text = "HAVE A GOOD AFTERNOON";
			AudioClip randomClip = goodAfternoonVoices [UnityEngine.Random.Range (0, goodAfternoonVoices.Length)];
			//Play that sound.
			GetComponent<AudioSource> ().PlayOneShot (randomClip);
			Debug.Log ("Have a Good Afternoon!");
		} 
		//Night Time
		if (sysHour >= 18 && sysHour <= 24) {
			MessageCentreText.text = "GOOD NIGHT";
			AudioClip randomClip = goodNightVoices [UnityEngine.Random.Range (0, goodNightVoices.Length)];
			//Play that sound.
			GetComponent<AudioSource> ().PlayOneShot (randomClip);
			Debug.Log ("Good Night!");
		}
		yield return new WaitForSeconds(3.1f); // wait time

		Application.Quit();

	}

}

Is this what you are after?

    int sysHour = DateTime.Now.Hour; //gives you the current hour as an integer.
    if (sysHour >= 8 && sysHour <= 12) //Is time between 8am and 12 noon
    {
         MessageCentreText.text = "GOOD MORNING";
         Debug.Log ("Good Morning!");
    }

@BackslashOllie,
I find that the way I have it now it displays the greeting but not the button state messages?

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class MessageCentreManager : MonoBehaviour {

	int sysHour = System.DateTime.Now.Hour;

	//Random Clips
	public AudioClip[] voices;
	public AudioClip[] timeVoicesNoon; //Noon Time
	public AudioClip[] timeVoicesMorning; //Morning Time
	public AudioClip[] timeVoicesNight; //Night Time

	//UI Text Reference
	public Text MessageCentreText;
	
	//Button States
	bool button01State = false; //Scanner
	bool button02State = false; //Auto Phone
	bool button03State = false; //Temperature
	bool button04State = false; //Laser
	bool button05State = false; //Turbo Boost
	bool button06State = false; //Oil Slick
	bool button07State = false; //Surveillance Mode
	bool button08State = false; //Trip Time
	bool button09State = false; //Radar
	bool button10State = false; //Countdown Timer
	bool button11State = false; //External Movie Player
	bool button12State = false; //Grappling Hook
	bool button13State = false; //Auto Door Left
	bool button14State = false; //Auto Door Right

	bool GreetUser = true;

	void Awake ()
	{

	}
	
	void Update () 
	{
	if (button01State == true) {
		MessageCentreText.text = "SCANNING";
	} else if (button02State == true) {
		MessageCentreText.text = "AUTO PHONE";
	} else if (button03State == true) {
		MessageCentreText.text = "INT TEMP";
	} else if (button04State == true) {
		MessageCentreText.text = "LASER FIRE";
	} else if (button05State == true) {
		MessageCentreText.text = "TURBO MODE";
	} else if (button06State == true) {
		MessageCentreText.text = "OIL SLICK";
	} else if (button07State == true) {
		MessageCentreText.text = "AUTO SCAN";
	} else if (button08State == true) {
		MessageCentreText.text = "TRIP TIME";
	} else if (button09State == true) {
		MessageCentreText.text = "RADAR";
	} else if (button10State == true) {
		MessageCentreText.text = "CNTDWN TIMER";
	} else if (button11State == true) {
		MessageCentreText.text = "EXT MOVIE PLAYER";
	} else if (button12State == true) {
		MessageCentreText.text = "GRAPL HOOK LAUNCH";
	} else if (button13State == true) {
		MessageCentreText.text = "AUTO DOOR LFT";
	} else if (button14State == true) {
		MessageCentreText.text = "AUTO DOOR RHT";
	}

	{
		if (GreetUser) ShowGreeting ();
	}
		 

	}

	void ShowGreeting ()
	{
		//Time OF Day Notification
		//Noon Time
		if (sysHour >= 12 && sysHour <= 18) {
			MessageCentreText.text = "GOOD AFTERNOON";
			Debug.Log ("Good Afternoon!");
		} 
		//Morning Time
		//else if (sysHour == 8) {
		else if (sysHour == 8 && sysHour <= 12) {
			MessageCentreText.text = "GOOD MORNING";
			Debug.Log ("Good Morning!");
		}
		//Night Time
		else if (sysHour == 18 && sysHour <= 24) {
			MessageCentreText.text = "GOOD EVENING";
			Debug.Log ("Good Evening!");
		}
		
		else{
			//Do something if desired
			MessageCentreText.text = "KNIGHT INDUSTRIES 2000";
			Debug.Log("KNIGHT INDUSTRIES 2000");
		}
		
	}
	
	
	//Scanner Button For Message
	public void GoScannerMessage()
	{
		button01State = true;
		button02State = false;
		button03State = false;
		button04State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Car Phone Button For Message
	public void GoAutoPhoneMessage()
	{
		button02State = true;
		button01State = false;
		button03State = false;
		button04State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Temperature Button For Message
	public void GoTemperatureMessage()
	{
		button01State = false;
		button02State = false;
		button03State = true;
		button04State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Laser Button For Message
	public void GoLaserMessage()
	{
		button04State = true;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Turbo Boost Button For Message
	public void GoTurboBoostMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = true;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Oil Slick Button For Message
	public void GoOilSlickMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = true;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Surveillance Mode Button For Message
	public void GoSurveillanceModeMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = false;
		button07State = true;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Trip Timere Button For Message
	public void GoTripTimerMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = true;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Radar Button For Message
	public void GoRadarMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = true;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Countdown Timer Button For Message
	public void GoCountdownTimerMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = true;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Movie Player Button For Message
	public void GoMoviePlayerMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = true;
		button12State = false;
		button13State = false;
		button14State = false;
	}

	//Grappling Hook Button For Message
	public void GoGrapplingHookMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = true;
		button13State = false;
		button14State = false;
	}

	//Auto Door Left Button For Message
	public void GoAutoDoorLeftMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = true;
		button14State = false;
	}

	//Auto Door Right Button For Message
	public void GoAutoDoorRightMessage()
	{
		button04State = false;
		button01State = false;
		button02State = false;
		button03State = false;
		button05State = false;
		button06State = false;
		button07State = false;
		button08State = false;
		button09State = false;
		button10State = false;
		button11State = false;
		button12State = false;
		button13State = false;
		button14State = true;
	}

}