NPC Dialogue Scripting - Request

Just asking for the basics.
//
Simple Script for clicking on a Object
They say A Messgae which is displayed (Anyway form fine)
Then Hitting a certain button ends dialogue
//
I can always work up off these things.
Thanks in Advance

sounds like a job for the UDE

Yeah I saw that, though I don’t have 100$ since I just wrecked my car… damn snow and ice!!!

You can do this fairly easily with OnGUI.

http://unity3d.com/support/documentation/Components/GUI%20Scripting%20Guide.html

I figured that was a way to go at it.
Though I’m not experienced enough on making it work.

Actually another way to go at it is to have a message box like in a mmo, where it displays things like lv ups, people talking ect ect.

Maybe I’ll make that a new topic.

If each character will only say the same thing always then this is real easy to so and you can set the value in the inspector…

Here ya go:

var MyText     : String = String.Empty;
var ScreenArea : Rect;
//var TextArea : Rect;
//var MyFont     : GUIStyle;
//var DialogueBG : Texture2D;

private var DisplayThis : boolean = false;

function Update()
{
  if (Input.GetKeyDown("S"))
     DisplayThis = !DisplayThis;
}

function OnGUI()
{
  if (DisplayThis)
     GUI.Box(ScreenArea, MyText);

/*
//alternatively...
  if (displayThis)
  {
     GUI.Label(ScreenArea, DialogueBG);
     GUI.Label(TextArea, MyText);
  }
*/
}

Now just drop this onto your object and voila…
Of course, there is a single catch with this code… if you drop this code on 10 objects and then hit S, then all 10 will try and display their description. Now, you mentioned you wanted to click on an object, yes… So what I would recommend is doing a raycast and seeing if this is an item that can show a description and if it can, just do a SendMessage() to a function to turn on/off the DisplayThis