parse interface - match any unused words

Started by CocodaMonkey, Sat 26/03/2005 22:14:01

Previous topic - Next topic

CocodaMonkey

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.

DoorKnobHandle

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!

CocodaMonkey

#2
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.

DoorKnobHandle

Uh. You get me there. I never even did a parser game. Sorry for that. But you can script it always like this:

Code: ags

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?

CocodaMonkey

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.

Ashen

SaidUnknownWord (string buffer);?
(Not very familiar with the parser, so it might not work)
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk