Difference between revisions of "MessageBox Tutorial"
→Starting, stopping, and the first menu: Links
imported>Haama |
imported>Haama |
||
Line 66: | Line 66: | ||
==Avoiding Common Mistakes for More Complex Menus== | ==Avoiding Common Mistakes for More Complex Menus== | ||
===Starting, stopping, and the first menu=== | ===Starting, stopping, and the first menu=== | ||
You won't want your menu script to run all the time, so it needs a clear beginning and a clear ending. On activators you can use the onActivate block and Activate | You won't want your menu script to run all the time, so it needs a clear beginning and a clear ending. On activators you can use the [[onActivate]] block and use [[ReferenceEditorID.Activate|Activate player, 1]] to start the menu: | ||
<pre>begin onActivate | <pre>begin onActivate | ||
messagebox "What would you like to do?" "Button 0" ... "Button 9" | messagebox "What would you like to do?" "Button 0" ... "Button 9" | ||
Line 100: | Line 100: | ||
... | ... | ||
set Choosing to 0 ;Whenever you want to exit the menu</pre> | set Choosing to 0 ;Whenever you want to exit the menu</pre> | ||
===Keeping multiple menus separated=== | ===Keeping multiple menus separated=== |