Asking a question
Hippyonastick
17 Sept 2012, 15:56I know that there's an if 'play answers yes...' option under the if section, but an intrusive popup appears so as to answer the question. Is there a way to ask a question without this happening.
Thank you,
Steven
Thank you,
Steven
sgreig
17 Sept 2012, 18:14Of course. Use a get input function to get the player's response and then use an if statement to check what they typed.
Hippyonastick
17 Sept 2012, 18:25Thanks. But how do I enter into the if statement to correspond with the player response? (sorry i'm new to this and scripting...)
sgreig
18 Sept 2012, 05:12
msg ("Ask player random yes or no question.")
get input {
if (result = "yes") {
msg ("Hooray!")
}
else {
msg ("You suck!")
}
}
The Pixie
18 Sept 2012, 06:59I would suggest modifying it so that:
if (result = "yes") {
becomes
if (StartsWith (LCase (result), "y")) {
This will then interprete "Yes", "yay", "Yeah" and "y" to mean yes too.
if (result = "yes") {
becomes
if (StartsWith (LCase (result), "y")) {
This will then interprete "Yes", "yay", "Yeah" and "y" to mean yes too.
sgreig
18 Sept 2012, 12:43The Pixie wrote:I would suggest modifying it so that:
if (result = "yes") {
becomes
if (StartsWith (LCase (result), "y")) {
This will then interprete "Yes", "yay", "Yeah" and "y" to mean yes too.
Good call.

Hippyonastick
19 Sept 2012, 14:51Thank you, it worked perfectly!