View Single Post
Old 05-28-2004, 03:35 PM   #9 (permalink)
ArteGordon
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

very nice indeed. One thing you might consider is adding in a property that indicates which entry has just been matched.
With that, external agents like the xmlspawner can monitor the conversation as well and trigger when they reach a designated state.
I just threw in that minor mod and it works great for setting up mini-quests and for conversationally triggered item/mob spawns. More flexible than the fixed keyword triggering.

Code:
private int m_CurrentMatchedEntry;
Code:
[CommandProperty( AccessLevel.GameMaster )]
		public int CurrentMatchedEntry
		{
			get { return m_CurrentMatchedEntry; }
			set { m_CurrentMatchedEntry = value; }
		}
Code:
private SpeechEntry SelectEntry( string speech )
		{
		    CurrentMatchedEntry = 0;
			foreach ( SpeechEntry entry in m_Speech )
			{
			    CurrentMatchedEntry++;
				if ( entry.Match( speech ) )
					return entry;
			}
			return null;
		}
although it is admittedly something that people could just add in if they wanted to do that and if you put in sequencing you would probably end up with a prop like that anyway so more of a minor consideration.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline