Create a free account to remove all ad content.

Author Topic:  talking script?  (Read 250 times)

0 Members and 1 Guest are viewing this topic.

Jason✪

  • Sr. Member
  • *
  • Posts: 281
  • I enjoy most forms of work
    • View Profile
  • Xbox: EpIc x MiNeR Z
talking script?
« on: June 03, 2015, 01:02:21 PM »
how do you make a talking script with an npc?
:D

Zoidberg

  • Legendary Member
  • *
  • Posts: 1445
    • View Profile
  • Xbox: v Zoidberg v
  • Steam: v_Zoidberg_v
Re: talking script?
« Reply #1 on: June 03, 2015, 01:19:59 PM »
You can put a Script within the 'Talk Script' of an NPC Spawn that will change the text of the NPC when activated with the SetText command.

Here's an example:

If
HasHistory [Dialogue1] [player] [false]
Then
SetText [x,y,z] [Hello.]
History [Dialogue1] [player]
ElseIf
HasHistory [Dialogue2] [player] [false]
Then
SetText [x,y,z] [How are you?]
History [Dialogue2] [player]
ElseIf
HasHistory [Dialogue3] [player] [false]
Then
SetText [x,y,z] [Nice meeting you, but I've got to get back to work. Goodbye.]
History [Dialogye3] [player]
Else
SetText [x,y,z] [I will talk to you when I am finished with my work.]


In the above example, the first time a player speaks with the NPC, the text 'Hello.' will appear.

The second time, the text 'How are you?' will appear.

The third time, the text 'Nice meeting you, but I've got to get back to work now. Goodbye.' will appear.

And every time after the third the text 'I will talk to you when I am finished with my work.' will appear.


Jason✪

  • Sr. Member
  • *
  • Posts: 281
  • I enjoy most forms of work
    • View Profile
  • Xbox: EpIc x MiNeR Z
Re: talking script?
« Reply #2 on: June 03, 2015, 01:20:52 PM »
ahh,thankyou
:D