Full Version : Making a puzzle with XmlDialogs?
xmlspawner >>Q&A >>Making a puzzle with XmlDialogs?
<< Prev | Next >>
Anheledir- 12-06-2007
Hi there,
I made a little quest with the spawner: a sailor tells the player a small puzzle-story with a "GUMP,name,2/..." (a Gump with a text entry area). If a player types in the correct answer he gets a new hint for the quest, if he doesn't he have to try again.
To react to the right answer wasn't a problem: Setting the keyword to the right answer, depending on the gump-row. But how can I react to any other answer? When setting another line (depending on the gump) with keyword to "*" it could run this even with the right answer (possibility 50%)... so how could I get this done? *confused*
Thanks for help
--Anheledir
ArteGordon- 12-07-2007
the keywords can be regular expressions, not just simple strings. The '*' is an example of a special regular expression that matches all strings. If you wanted to match everything except a given string, use something like
^(?!hello).*$
which will trigger on anything except the word hello
Here is basic intro to regular expressions
http://www.regular-expressions.info/quickstart.html
Anheledir- 12-07-2007
The keywords can be regex??
OK, I believe there are much more possibilities as I thought.
Thanks