I made the same reply in your other thread too.
Just to add ... Using a "listener" can be a hit or miss affair as well - and therefore, not as reliable as the method below.
The system you are describing was more appropriately used in NWN1 when other GUI options were not available to us. And the real question here, is more about how you want your player to interact with the game. For instance, it is unusual for the player to use the "chat" function "out of the blue" nowadays in the hope of activating a speech or conversation of some kind. I have designed and used a system very much like you describe, but it has always been for NWN1. In NWN2, we have interactive GUIs to work with the player, and ensure the player is "playing" the game as expected (if that makes sense). The best solution is to bring up a GUI when the player is aware of all the facts about when and where to say a "phrase or word" to move the game forward. e.g. The PC learns that if they say "Pie and Chips" to the boar head in the hallway, then a secret door will open. Before they knew this, clicking on the boar's head would have done nothing (made non useable - or possibly do something if you wanted to). However, once they know about the boar's head, it is made useable and when clicked on offers the player a GUI which awaits the appropriate text.
Check out my tutorial on how to incorporate this sort of stuff ... you will never regret doing so, as it really does opens up a whole new world of inetresting gaming stuff if you can get to grips with it.
Lance.
EDIT: I have not checked this out, but maybe this has something based upon NWN1 coding for your original use of the "chat" facility. Also, possible this and this. Personally, however, I still think presenting the player with a GUI is the way to go. You can still then have the "placeable" object respond with appropriate speakstrings if you like - and the code can be made very generic/versatile.
Modifié par Lance Botelle, 07 février 2013 - 02:47 .





Retour en haut







