Difference between revisions of "MessageBox Tutorial"
m
→GetButtonPressed: Clarity
imported>Haama m (→Running the same choice for multiple frames: Clarity) |
imported>Haama m (→GetButtonPressed: Clarity) |
||
Line 13: | Line 13: | ||
===GetButtonPressed=== | ===GetButtonPressed=== | ||
#GetButtonPressed returns numbers from –1 to 9: | #GetButtonPressed returns numbers from –1 to 9: | ||
*'''''-1''''' means no decision has been made | #*'''''-1''''' means no decision has been made | ||
*'''''0''''' means the player selected the first option | #*'''''0''''' means the player selected the first option | ||
*'''''1''''' for the second | #*'''''1''''' for the second | ||
*... | #*... | ||
*'''''9''''' for the tenth(you can have 10 options at most) | #*'''''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 | #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) | <pre>if (GetButtonPressed == -1) | ||
Line 32: | Line 31: | ||
... | ... | ||
elseif (Choice == 0)</pre> | elseif (Choice == 0)</pre> | ||
Likewise, GetButtonPressed will return -1 for all following frames (until the script runs another messagebox). | Likewise, GetButtonPressed will return -1 for all following frames (until the script runs another messagebox). | ||