View Full Version : Help with Merchants and Doors


Faerus Stoneslammer
Sun, 6th Apr '03, 9:08pm
Can anyone explain to me, in laymen's terms, how to link an NPC to a store and let me (ie the PC) access the store through dialog?

Secondly, I created an inn in a village and I can enter the inn by opening a door and walking in. However, on the inside I created an exit but it's not visible (ie there's no door or doorway) can anyone please help?

ANY help would be greatly appreciated, thanks!

Blackthorne TA
Mon, 7th Apr '03, 6:18pm
Basically, the link is through scripting. You can take actions (attach a script) to any dialog line via the "Actions Taken" tab in the conversation editor. So, you have a dialog from the NPC saying something like "Would you like to see my wares?" and then on the "Yes" reply of the PC, you attach a script that has the "OpenStore" function in it like so:
void main()
{
OpenStore(GetNearestObjectByTag("tag_name_for_your_store"), GetPCSpeaker());
}Oh, and in case you didn't know, you have to paint the store somewhere in your module (just like you painted the NPC). Typically you do so close to the NPC who "owns" the store.

[ April 08, 2003, 03:04: Message edited by: Blackthorne TA ]