Difference between revisions of "Messagebox Tutorial/GameMode And MenuMode"
Messagebox Tutorial/GameMode And MenuMode (edit)
Revision as of 01:58, 15 September 2007
, 01:58, 15 September 2007→The script: Updated
imported>Haama (→The basics: Clarity) |
imported>Haama (→The script: Updated) |
||
Line 10: | Line 10: | ||
==The script== | ==The script== | ||
Note that these are the changes from the [[ | Note that these are the changes from the [[MessageBox_Tutorial#Example_script|example script]] (I would suggest opening it in a new tab/window). | ||
<pre>Short GMRun | <pre>Short GMRun | ||
Short ExitButton | Short ExitButton | ||
Line 29: | Line 29: | ||
If (Choosing == 0) | If (Choosing == 0) | ||
Set GMRun to 0 | Set GMRun to 0 | ||
Set Working to 0 | |||
;Add anything that needs to be re-initialized | |||
Elseif GMRun | Elseif GMRun | ||
Set GMRun to 0 | Set GMRun to 0 | ||
Line 39: | Line 37: | ||
Elseif (Choice == -1) | Elseif (Choice == -1) | ||
Set Choice to GetButtonPressed | Set Choice to GetButtonPressed | ||
Elseif (Choice != ExitButton) | Elseif (Choice != ExitButton) | ||
Set ExitButton to 0 | Set ExitButton to 0 | ||
Messagebox "Exiting options..." | Messagebox "Exiting options..." | ||
Elseif (Choice == ExitButton) | |||
Set Choosing to 0 | |||
Endif | Endif | ||
End | End | ||
Line 69: | Line 68: | ||
"Cancel" | "Cancel" | ||
End</pre> | End</pre> | ||
==A few notes== | ==A few notes== | ||
Basically, this works by firing up a menu while in GameMode. The menu will start up the MenuMode block, which will then display the correct menu. The menu I've chosen to display for GameMode is "Exiting options…". I've done this as, if the player happens to see this menu, something has gone wrong and when the player clicks "Done" the options menu will close (I have yet to see this menu, by the way). | Basically, this works by firing up a menu while in GameMode. The menu will start up the MenuMode block, which will then display the correct menu. The menu I've chosen to display for GameMode is "Exiting options…". I've done this as, if the player happens to see this menu, something has gone wrong and when the player clicks "Done" the options menu will close (I have yet to see this menu, by the way). |