Difference between revisions of "MessageBox Tutorial"

Jump to navigation Jump to search
50 bytes added ,  00:19, 15 September 2007
m
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 <prpre>YourActivatorsReferenceEditorID.Activate player, 1</pre>.
 
==Moving Between Multiple Menus==
Anonymous user

Navigation menu