Difference between revisions of "MessageBox Tutorial"
Jump to navigation
Jump to search
m
→GetButtonPressed: Clarity
imported>Haama m (→Running the same choice for multiple frames: Clarity) |
imported>Haama m (→GetButtonPressed: Clarity) |
||
|
===GetButtonPressed===
#GetButtonPressed returns numbers from –1 to 9:
#*'''''-1''''' means no decision has been made
#*'''''0''''' means the player selected the first option
#*'''''1''''' for the second
#*...
#*'''''9''''' for the tenth(you can have 10 options at most)
#GetButtonPressed will only return the correct button press the first time it's called in a script; any other use of GetButtonPressed will return -1. For instance, if the player presses the first button, then in the following script
<pre>if (GetButtonPressed == -1)
...
elseif (Choice == 0)</pre>
Likewise, GetButtonPressed will return -1 for all following frames (until the script runs another messagebox).
| |||