Aller au contenu

Photo

How do you do a talking door that unlocks when the PC speaks a certain line of dialogue.


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Groove Widdit

Groove Widdit
  • Members
  • 384 messages
Hello, fine geniuses :) 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.

#2
Fester Pot

Fester Pot
  • Members
  • 1 394 messages
Define speak?

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

FP!

#3
Groove Widdit

Groove Widdit
  • Members
  • 384 messages
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.

#4
Fester Pot

Fester Pot
  • Members
  • 1 394 messages
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 .


#5
Groove Widdit

Groove Widdit
  • Members
  • 384 messages
Cool. Thanks again, FP.

#6
Groove Widdit

Groove Widdit
  • Members
  • 384 messages
Worked perfectly the first time. The sound effect is cool.