Talking Doors

From Neverwinter Pedia

Jump to: navigation, search

Talking Doors are one of the most difficult thing to create in NWN2. But once you understand the logic (or lack of logic) behind it, you will do fine.

The confusion arise when people remembered that all models in NWN2 are OBJECTS. However, because in real life, doors are inanimated object as compared to people, they are typically NOT allowed to "talk".

Its confusing, isn't it? First, everything (models) in the games are OBJECT. And now the NWN2 developers are telling us that they have put the OBJECTS into different categories. Try to think of it this way: NPCs and PCs are 'human', hence they are allowed to use "Conversation" in the game. Table, chairs, magic book, enchanted chest, and Doors, are usually NOT allowed to carry out a "conversation"in real life, so they cannot "begin a conversation" with the PC.

Note: Conversation, is shortened to just "convo" in developers' speak.



So, in order for a Magical Door to "speak" with the PC, some creative scripting is needed. Because players would normally "CLICK" on a door to "USE" it, the convo scripts are placed into the OnClick, or OnUse event hooks of Doors.


OnClick/OnUse

Since Magical Talking Doors are best used as guardian, and will only let you pass through it after you have spoken with it, we can almost expect ALL talking doors to be "LOCKED."

One of the most common mistake when creating Talking Doors is that many modders would consider tagging the script (such as ga_talk_door and ga_talk_object) onto the OnUse or OnClick event hooks.

However, the ga and gc scripts only work within conversations for NPCs (human speakers). Hence, in order to begin convo with a door (or other inanimate object) through the OnCick event, one must use the ActionStartConversation script.

So, in order to carry out a convo with a door (assuming that the door is locked), write your own script using ActionStartConversation function, and then place the written script in the OnClick/OnUse events.


OnFailedToOpen

Then, place the ga_talk_door script on the OnFailedToOpen event to instruct the to fire the conversation with the user who had just "failed to open the door."

I know, it is a strange way to make the doors talk. The whole ideas of doors talking is strange to begin with, no?