Difference between revisions of "MessageBox Tutorial"

Jump to navigation Jump to search
348 bytes removed ,  00:18, 15 September 2007
→‎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)
===Activator Script===
<pre>scn YourMenuScript
Short Working
Short Choosing
Short Choice
short Reset
 
 
Begin onActivate
Set Choosing to -1
Set ResetWorking to 1
If (GetInSameCell player == 0) ;always keep it near the player
MoveTo player
Endif▼
End
 
 
Begin GameMode
If Working
If (Choosing == 0) ;meaning it shouldn't be running
IfSet ResetWorking to 0
;Add anything that needs to be re-initialized,
Endif▼
; or that you changed in the onActivate block that needs to be reset
Set Reset to 0▼
▲ Endif
If (GetInSameCell YourXMarker == 0)
MoveTo YourXMarker
Endif
 
 
Elseif (Choosing == -1) ;Display your menu
Messagebox "Which option?" "First Option" "Second Option" ;... "Tenth Option"
Set Choosing to 1
Set Choice to -1
;run your code for the second decision
Set Choosing to 0 ;to finish up
;...
; Elseif (Choice == 9) ;Final/Tenth Option▼
;Further illustrations of more options
;run your code for the tenth decision▼
; Elseif (Choice == #) ;Nth Option
; Set ;runChoosing yourto code0 for the;to nthfinish decisionup
 
; Set Choosing to 0
▲; Elseif (Choice == 9) ;Final/Tenth Option
▲ ;run your code for the tenth decision
; Set Choosing to 0
Endif
Endif
▲ Set ResetWorking to 01
▲ Endif
End</pre>
You can start your menus from any script with <pr>YourActivatorsReferenceEditorID.Activate player, 1</pre>.
Anonymous user

Navigation menu