Making a door check for an item
Ugly_Duck
Member Posts: 183
This is probably the simplest thing in the world, but I'm clueless (again). I'm trying to make a door start a conversation with the PC; this part I got. Next, check the PCs inventory for a particular item, a guild insignia. If the PC has it, teleport the PC to the waypoint (WP_INSIDE_GUILDHOUSE_001) inside the guild house. If he doesn't have the item, deny access and say something silly in the conversation like, "Bugger off! Ye ain't allowed in!".
Another thing, this is with the conversation editor. I don't know how to make different text for options, such as the above. Where the conversation has 3 outcomes:
1.) (Checks inventory & HAS the item) "Yes, I have the item."
2.) (Checks inventory & DOESN'T have the item) "No, I don't have the item."
3.) Do nothing & walk away.
I searched the lexicon for "Talking Doors" and nothing showed up.
Also, have the PC KEEP the item used to enter the guild house.
Another thing, this is with the conversation editor. I don't know how to make different text for options, such as the above. Where the conversation has 3 outcomes:
1.) (Checks inventory & HAS the item) "Yes, I have the item."
2.) (Checks inventory & DOESN'T have the item) "No, I don't have the item."
3.) Do nothing & walk away.
I searched the lexicon for "Talking Doors" and nothing showed up.
Also, have the PC KEEP the item used to enter the guild house.
0
Comments
Something I've found useful is to see how the OC did stuff like this. You just copy the appropriate chapter of the OC to the "modules" folder and then rename the extension to .mod so that the toolset can "see" it. You can then open the OC, open the area where you know it did something similar and see how it was done so you can copy and adapt it.
I'm assuming this is for multi-player because the simplest way of doing it for single-player is just to use the guild token as the key to unlock the door.
One way of doing it for multi-player is to allow anyone to open the door but then use the OnTransitionClick to deny non-members entry to the building, optionally with a message.
Another way is to use the OnFailToOpen script to check if the person attempting to open the door is holding the guild token and if they are, send the person inside the guild.
Both of these approaches to the problem are simpler to script and also faster for the player than having to go into a conversation.
NwN Lexicon 1.69 - Searchable chm document with all the pre-EE script functions explained.
Online lexicon list and explanation of all the new EE functions.
Just The FAQs, ma'am - Contains the scripting Frequently Asked Questions (with answers) in pdf format.
TR