Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: CocodaMonkey on Sat 26/03/2005 22:14:01

Title: parse interface - match any unused words
Post by: CocodaMonkey on Sat 26/03/2005 22:14:01
Is it possible with the parser interface to match any unused words? By this I mean if a person types "ldkfjdlskfjdl" I want to match that. But at the same time if a person types "hello" or any other words currently in the list I don't want to match that.
Title: Re: parse interface - match any unused words
Post by: DoorKnobHandle on Sat 26/03/2005 22:17:15
of course. but I am very sure it is mentioned somewhere in the manual...

well, in the editor there is an option "matches any word", that should be it!
Title: Re: parse interface - match any unused words
Post by: CocodaMonkey on Sat 26/03/2005 22:20:48
No, not match any word. Match any unused word. Match any word won't work because I can't have it matching words like hello or anything that is in the list of words.

Alternativly I think I could manage the same effect if there is some sort of stopscript function but i can't find one.
Title: Re: parse interface - match any unused words
Post by: DoorKnobHandle on Sat 26/03/2005 22:28:10
Uh. You get me there. I never even did a parser game. Sorry for that. But you can script it always like this:


string input;
GetTextBoxText ( 3, 6, input );
ParseText ( input );
if ( Said ( "X") )
   Display ( "X" );
if ( Said ( "Y" ) )
   Display ( "Y" );
else
   Display ( "Z" );


That will say "X" if the player typed "X", it will say "Y" if the player typed "Y" and it will say "Z" whenever the player types anything else.

Does that help?
Title: Re: parse interface - match any unused words
Post by: CocodaMonkey on Sat 26/03/2005 22:46:23
No, that's just standard parser usage. I just need a catch all. But one that only catches if the word isn't in the system.

Don't worry about it. I'll just code it diffrently so that I don't need such a function. It's a little more round about but it'll work.
Title: Re: parse interface - match any unused words
Post by: Ashen on Sun 27/03/2005 04:05:40
SaidUnknownWord (string buffer);?
(Not very familiar with the parser, so it might not work)