summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-10-10 16:23:19 -0400
committergumi <git@gumi.ca>2018-10-11 18:14:18 -0400
commite3df7d8ebda36542c477beba281dfc3f9c737af4 (patch)
treebc34170e800098ccee6246c0cd870644e239c160 /doc/script_commands.txt
parentbaeb7a1742b0fd7ac5d3a4cecd90f74d461895fe (diff)
downloadhercules-e3df7d8ebda36542c477beba281dfc3f9c737af4.tar.gz
hercules-e3df7d8ebda36542c477beba281dfc3f9c737af4.tar.bz2
hercules-e3df7d8ebda36542c477beba281dfc3f9c737af4.tar.xz
hercules-e3df7d8ebda36542c477beba281dfc3f9c737af4.zip
bake buildin_prompt into buildin_select and clarify the difference between the two
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt17
1 files changed, 10 insertions, 7 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 64468ed49..aa7141951 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -1600,21 +1600,24 @@ perfectly equivalent.
---------------------------------------
*select("<option>"{, "<option>", ...})
-*prompt("<option>"{, "<option>", ...})
This function is a handy replacement for 'menu' that doesn't use a complex
-label structure. It will return the number of menu option picked,
-starting with 1. Like 'menu', it will also set the variable @menu to
-contain the option the user picked.
+label structure. It will return the number of the menu option picked,
+starting with 1. If the player presses cancel, the script is terminated.
- if (select("Yes:No") == 1)
+ if (select("Yes", "No") == 1)
mes("You said yes, I know.");
And like 'menu', the selected option is consistent with grouped options
and empty options.
-'prompt' works almost the same as select, except that when a character
-clicks the Cancel button, this function will return 255 instead.
+---------------------------------------
+
+*prompt("<option>"{, "<option>", ...})
+
+This function behaves exactly like select(), but when a player presses cancel
+it returns 255 and the script is not terminated. You almost always want to use
+select() rather than prompt().
---------------------------------------