Issue with command #object#

J_J

I have a command that is "show #object# to #object1#" or "show #object1# #object#"

The problem I'm having is that for the second option, if object has two words the program gets confused.

"Show mom baseball glove" the response is that the program can't see "mom baseball." Any way to fix this?


Can you just use a show verb on baseball glove and tab the ‘require another object’ option?

The verbiage is a little hit or miss though because “show baseball glove to mom would work” but “show mom baseball glove wouldn’t. The first sounds more natural anyway.

You could use a RexEx to handle this as well if you want both option to work.

EDIT: you could also put a show verb on mom and copy-paste the script so both would work.

Does this help? I can whip up a little demo if you need it. Just let me know.


Making the latter work properly would take a lot of work on the parser, because Quest's regex support is incomplete. i can see a way to do it, but it would take a complete overhaul of the parser.


Could you have two separate RegEx commands to handle each way to word it? All it would take is a flag at the beginning to check and see if the glove was already shown to mom. Right? I could totally be missing something here. It’s been known to happen. Quite frequently actually. :/


Set the command to use a "Regular Expression" instead of a "Command pattern", then use this as the pattern:

show (?<object>.*) to (?<object1>\w*)|show (?<object1>\w*) (?<object>.*)

The important bit is that Quest normally matches .*, as with object above; the dot means any character and the star means any number. For object1, I am using \w*, which does not match spaces, so will only grab whole words.

Of course if the player ever want to show anything to something that is two words (eg show his mum to the baseball glove), it will fail.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums