Difference between revisions of "MessageBox Tutorial"
Jump to navigation
Jump to search
m
→Activator Script
imported>Haama (→Activator Script: Using Variable-Loaded method, changed around extra button info) |
imported>Haama |
||
|
Begin GameMode
If Working
If (Choosing == 0) ;meaning it shouldn't be running
Set Working to 0
;Add anything that needs to be re-initialized,
Elseif (Choosing == -1) ;Display your menu
Messagebox "Which option?" "First Option" "Second Option" ... "Tenth Option"
Set Choosing to 1
Set Choice to -1
Elseif (Choosing == 1) ;Catch the player's decision
If (Choice == -1) ;No choice yet
Set Choice to GetButtonPressed
Elseif (Choice == 0) ;First Option
;run your code for the first decision
Set Choosing to 0 ;to finish up
Elseif (Choice == 1) ;Second Option
;run your code for the second decision
Set Choosing to 0 ;to finish up
;...
; Elseif (Choice == 9) ;Tenth Option
;run your code for the tenth decision
; Set Choosing to 0 ;to finish up
Endif▼
Endif
Set Working to 1▼
Endif
▲ Set Working to 1
▲Endif
End</pre>
You can start your menus from any script with <
==Moving Between Multiple Menus==
| |||