Difference between revisions of "MessageBox Tutorial"
Jump to navigation
Jump to search
→Activator Script: Using Variable-Loaded method, changed around extra button info
imported>Haama (→Activator: Note on Reference Editor ID) |
imported>Haama (→Activator Script: Using Variable-Loaded method, changed around extra button info) |
||
Line 335: | Line 335: | ||
===Activator Script=== | ===Activator Script=== | ||
<pre>scn YourMenuScript | <pre>scn YourMenuScript | ||
Short Working | |||
Short Choosing | Short Choosing | ||
Short Choice | Short Choice | ||
Line 343: | Line 343: | ||
Begin onActivate | Begin onActivate | ||
Set Choosing to -1 | Set Choosing to -1 | ||
Set | Set Working to 1 | ||
End | End | ||
Line 352: | Line 349: | ||
Begin GameMode | Begin GameMode | ||
If Working | |||
If (Choosing == 0) ;meaning it shouldn't be running | 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 | Elseif (Choosing == -1) ;Display your menu | ||
Messagebox "Which option?" "First Option" "Second Option" | Messagebox "Which option?" "First Option" "Second Option" ... "Tenth Option" | ||
Set Choosing to 1 | Set Choosing to 1 | ||
Set Choice to -1 | Set Choice to -1 | ||
Line 377: | Line 368: | ||
;run your code for the second decision | ;run your code for the second decision | ||
Set Choosing to 0 ;to finish up | 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 | |||
; Elseif (Choice == 9) ; | |||
; Set Choosing to 0 | |||
Endif | Endif | ||
Endif | Endif | ||
Set Working to 1 | |||
Endif | |||
End</pre> | End</pre> | ||
You can start your menus from any script with <pr>YourActivatorsReferenceEditorID.Activate player, 1</pre>. | You can start your menus from any script with <pr>YourActivatorsReferenceEditorID.Activate player, 1</pre>. |