the built-in 'ask' Function is a 'yes~no' question ONLY:
an example:
ask ("Would you like something to drink?") {
// you choose 'yes' or 'no'
// internally, the 'ask' Function converts:
// yes --> true
// no --> false
if (result = true) {
msg ("Ah, then what would you like to drink?")
} else if (result = false) {
msg ("Would you like something to eat instead then?")
}
}
so for a question with choices (a non-yes~no question):
such as in my above example: 'what would you like to drink?'
you got two (simplistic) options:
msg
get input
~OR~
show menu
an example using show menu:
ask ("Would you like something to drink?") {
if (result = true) {
show menu ("Ah, then what would you like to drink?", split ("water;soda;juice", ";"), false) {
invoke (result.drink)
}
} else if (result = false) {
ask ("Would you like something to eat instead then?") {
if (result = true) {
show menu ("Ah, then what would you like to eat?", split ("pizza;hamburger;salad", ";"), false) {
invoke (result.eat)
}
} else if (result = false) {
msg ("Okay, well if you get hungry and~or thirsty later, let me know.")
}
}
}
}
----------------------
to make the quotes be displayed in your msg:
\"
the back slash tells quest to display the quote to the right of it in your message
and this is part of the 'text', so it HAS to be within quotes, as well:
msg (" \"Hey, how are you doing?,\" your friend, " + npc1.alias + ", greets you.")
--------------
as for writing 'text' + Variable, there's a trick~secret to it:
break it into chunks!
(we're using Attributes for the Variable in this example, so: Object_name.Attribute_name)
the two chunks (separated by the pluses) :
" text "
+
Object_name.Attribute_name
or, if you prefer this look instead:
" text (including spaces) "
+ Object_name.Attribute_name +
---------------
an example:
player.alias = "HK"
player.gender_string = "male"
player.race = "human"
player.class = "warrior"
msg (player.alias + " is a " + player.gender_string + " " + player.race + " " + player.class + ".")
outputs: HK is a male human warrior.
the chunks:
player.alias
+
"(space) is (space) a (space)"
+
player.gender_string
+
"(space)"
+
player.race
+
"(space)"
+
player.class
+
"(dot~period: it's hard for my bad eyes to see it, lol)"
or, the alternative look:
player.alias +
"(space) is (space) a (space)"
+ player.gender_string +
"(space)"
+ player.race +
"(space)"
+ player.class +
"(dot~period: it's hard for my bad eyes to see it, lol)"