Author Topic: How do you do a talking door that unlocks when the PC speaks a certain line of dialogue.  (Read 405 times)

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0


               Hello, fine geniuses '<img'> Does anyone know how to create a talking door that unlocks when the PC speaks a certain line? I found the topic in the NWN2 forum, but not in this one. I tried the script for making a placable talk--did not work.
               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0


               Define speak?

Is it an available option in the conversation tree, or via the chat command?

FP!
               
               

               
            

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0


               I want to use a conversation tree like you would with a NPC. I did that. I think it's a script to run in the door's OnFailToOpen, and Action Taken in the conversation node.
               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0


               You can easily create a talking door, so let's make one together!

Set the door to Locked and Plot.

Have the door require a Key and give it a unique TAG.

Put the below script on the door's OnFailToOpen -

void main()
{
object oPC = GetClickingObject();
if (!GetIsPC(oPC)) return;
object oTarget = OBJECT_SELF;

AssignCommand(oTarget, ActionStartConversation(oPC, ""));

}


In the ADVANCED TAB of the door, type in the name of your conversation file.

Click EDIT.

Now make your conversation. On the dialog line you want the door to unlock, put the following script in the ACTIONS TAKEN TAB -

void main()
{
SetLocked(OBJECT_SELF, FALSE);
}


This unlocks the door.

For a little more umph, click on the OTHER ACTIONS TAB, and paste the below sound clip on the Play Sound line -

gui_picklockopen

This will make the sound of tumblers unlocking on the door.

You can leave it at that and allow the PC to end the conversation and open the door themselves, or offer a dialog for the PC to select that will open the door for them. If it's the latter, use the below script -

void main()
{
AssignCommand(OBJECT_SELF, ActionOpenDoor(OBJECT_SELF));
}


That should do it.

FP!
               
               

               


                     Modifié par Fester Pot, 23 novembre 2013 - 02:18 .
                     
                  


            

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0


               Cool. Thanks again, FP.
               
               

               
            

Legacy_Groove Widdit

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +0/-0


               Worked perfectly the first time. The sound effect is cool.