"Say password"
Mosh
22 Jan 2015, 16:20I'm trying to create a simple locked door puzzle. The player finds a piece of paper with a codeword on it, walks up to a door with a microphone and has to say the password.
Ideally I'd like the solution to be along the lines of "SAY BLAH", but I can't work out how to do that. Is there a way of using a verb without an object?
The only other solution I've found is similar to the kaypad ones given on other threads ("USE MICROPHONE" leading to a script which asks "What do you want to say?"), but I'd prefer a more elegant solution.
Apologies if this has been answered elsewhere. I did have a dig on here and couldn't find anything.
Ideally I'd like the solution to be along the lines of "SAY BLAH", but I can't work out how to do that. Is there a way of using a verb without an object?
The only other solution I've found is similar to the kaypad ones given on other threads ("USE MICROPHONE" leading to a script which asks "What do you want to say?"), but I'd prefer a more elegant solution.
Apologies if this has been answered elsewhere. I did have a dig on here and couldn't find anything.

OurJud
22 Jan 2015, 16:42You could set up a command pattern for 'say blah' and then run a script which open the door.
Mosh
22 Jan 2015, 17:15I'd spotted "command pattern" in the verb section. Just looked it up in the documentation and this could be just what I'm after - thank you!
http://docs.textadventures.co.uk/quest/ ... mands.html
http://docs.textadventures.co.uk/quest/ ... mands.html

OurJud
22 Jan 2015, 18:45You're welcome. I hope it solves your problem 

HegemonKhan
22 Jan 2015, 19:43here's a useful link, that is easy to miss:
http://docs.textadventures.co.uk/quest/
http://docs.textadventures.co.uk/quest/guides/ (don't forget to scroll down too, as there's a bottom section of more guides)
COMMANDS (or the simplier: 'get input' Script) are good for typed-in inputs by the user playing the game.
http://docs.textadventures.co.uk/quest/ ... mmand.html
http://docs.textadventures.co.uk/quest/ ... input.html
hope these help, ask more if you got questions or need help with anything.
http://docs.textadventures.co.uk/quest/
http://docs.textadventures.co.uk/quest/guides/ (don't forget to scroll down too, as there's a bottom section of more guides)
COMMANDS (or the simplier: 'get input' Script) are good for typed-in inputs by the user playing the game.
http://docs.textadventures.co.uk/quest/ ... mmand.html
http://docs.textadventures.co.uk/quest/ ... input.html
hope these help, ask more if you got questions or need help with anything.
The Pixie
23 Jan 2015, 08:05I would set up a command pattern:
Then in the command script, something like this:
The variable "text" there will contain anything matched by the command.
The advantage of this method is that saying the wrong password is handled neatly.
say #text#
Then in the command script, something like this:
if (LCase(text) = "blah") {
msg("You say \"Blah!\" and the door magically opens.")
door.locked = false
}
else {
msg("You say \"" + text + "!\". Were you expecting something to happen?")
}
The variable "text" there will contain anything matched by the command.
The advantage of this method is that saying the wrong password is handled neatly.
Silver
23 Jan 2015, 08:27You might want to think about whether you'll be using the say command again if doing it that way and/or code it to be room specific.
Mosh
23 Jan 2015, 13:15I'd actually used the "get input" method for entering a code on a keypad - that was the solution offered for a similar problem elsewhere on the forum.
It is a matter of weighing up usage, complication and so on. I have yet to come across a problem in Quest that can't be resolved, even if it means digging down to code level. I'm currently using Quest with S2 (12-ish year old) pupils so trying to keep things within the menu system, but often you get a "How do you...?" question and the answer involved some coding.
In honesty, the pupils who ask this are normally the ones who'll enjoy getting their hands dirty so it's a good introduction to "proper" coding.
It is a matter of weighing up usage, complication and so on. I have yet to come across a problem in Quest that can't be resolved, even if it means digging down to code level. I'm currently using Quest with S2 (12-ish year old) pupils so trying to keep things within the menu system, but often you get a "How do you...?" question and the answer involved some coding.
In honesty, the pupils who ask this are normally the ones who'll enjoy getting their hands dirty so it's a good introduction to "proper" coding.