Page 1 of 1

How to make an npc talk in 2.6.1 PAS please help

Posted: March 22nd, 2011, 9:12 pm
by own4lif3
Okay so i need to know what codes to use to make an npc talk, i know its in the cfg file i can learn quick please help me. An example of one would be great so i can play arround with that and learn it. THANKS in advance

Re: How to make an npc talk in 2.6.1 PAS please help

Posted: March 24th, 2011, 7:25 pm
by CyberxNeku
Heres a really great reference of pretty much all u need to know to make an npc talk through gui menus ^^ viewtopic.php?f=24&t=1317&p=10518&hilit ... ger#p10518

Re: How to make an npc talk in 2.6.1 PAS please help

Posted: March 25th, 2011, 6:57 pm
by chocolatepie33
well, if you want an example:

Code: Select all

level_trigger_1 = [showgui npc1-1]
newgui npc1-1 [
guitext "Yo, what's up, dawg?"
guibar
guibutton "Uh, hi?" [cleargui]
guibutton "(Ignore him and go away)" [cleargui]
] "Weird Guy"


Re: How to make an npc talk in 2.6.1 PAS please help

Posted: March 27th, 2011, 3:52 pm
by own4lif3
okay thank you for all your help, now is there any way to have a conversation with them instead of just one gui would i just add a new gui like this:

Code: Select all

    level_trigger_1 = [showgui npc1-1]
    newgui npc1-1 [
    guitext "Yo, what's up, dawg?"
    guibar
    guibutton "Uh, hi?" [showgui npc2-2]
    guibutton "(Ignore him and go away)" [cleargui]
    ] "Weird Guy"

    level_trigger_1 = [showgui npc2-2]
    newgui npc1-2 [
    guitext "Yo, what's up, dawg?"
    guibar
    guibutton "uhh hello.." [cleargui]
    guibutton "Walk away" [cleargui]
    ] "Weird Guy"
would that work?

Re: How to make an npc talk in 2.6.1 PAS please help

Posted: March 27th, 2011, 4:03 pm
by chocolatepie33
yes, it would be the same, but you wouldn't need to put npc2-2 in there; it's easier to put npc1-2 (person 1, menu 2) in there. Got it?
Also, you wouldn't need a second "level_trigger_1" to pull it up.
With corrections, here's what I think you're looking for:

Code: Select all

    level_trigger_1 = [showgui npc1-1]
    newgui npc1-1 [
    guitext "Yo, what's up, dawg?"
    guibar
    guibutton "Uh, hi?" [showgui npc1-2]
    guibutton "(Ignore him and go away)" [cleargui]
    ] "Weird Guy"

    newgui npc1-2 [
    guitext "Seriously, how're you doing?"
    guibar
    guibutton "I'm doing fine, thanks." [showgui npc1-3]
    guibutton "Walk away" [echo "Hmph. The nerve of some people." ; cleargui]
    ] "Weird Guy"

    newgui npc1-3 [
    guitext "(BLAH BLAH BLAH)
    guibar
    guibutton "(BLAH BLAH 1) [action]
    guibutton "(BLAH BLAH 2) [action]
    ] "Weird Guy"
I changed a little bit of it, a guy isn't gonna say the same thing twice now, is he?
I also continued it, put in some placeholder kind of things.

Re: How to make an npc talk in 2.6.1 PAS please help

Posted: March 27th, 2011, 5:31 pm
by own4lif3
okay got it! thanks!