Difference between revisions of "MessageBox Tutorial/Ensuring Your Menu Is Seen"
Jump to navigation
Jump to search
MessageBox Tutorial/Ensuring Your Menu Is Seen (edit)
Revision as of 17:23, 28 June 2007
, 17:23, 28 June 2007Unfinished Article
imported>Haama (Temporarily Removed from Scripting Tutorials Category) |
imported>Qazaaq (Unfinished Article) |
||
Line 62: | Line 62: | ||
And now I'm sure you want to know what all of that actually does, but some quick background first. When another menu overwrites yours, any response the player makes will be caught by the other script's [[GetButtonPressed]], but not by your script's [[GetButtonPressed]]. That means '''''Choice''''' will always be '''''-1'''''. So, these extra lines will start a countdown once the player has left the menu screen ([[MenuMode]] 1001). If both 1 second and 45 frames pass and [[GetButtonPressed]] is still returning '''''-1''''' then your menu is reset (with <u>'''''set Choosing to -(Choosing)'''''</u>. The countdown won't run when the player presses <ESC> and looks through their options (that's what that whole mess of <u>'''''if (MenuMode 1004)'''''</u>... is for). This won't disturb other menus, because the countdown is reset whenever a new menu is displayed. So, once the other mod's menus are out of the way, your menu will be shown again. | And now I'm sure you want to know what all of that actually does, but some quick background first. When another menu overwrites yours, any response the player makes will be caught by the other script's [[GetButtonPressed]], but not by your script's [[GetButtonPressed]]. That means '''''Choice''''' will always be '''''-1'''''. So, these extra lines will start a countdown once the player has left the menu screen ([[MenuMode]] 1001). If both 1 second and 45 frames pass and [[GetButtonPressed]] is still returning '''''-1''''' then your menu is reset (with <u>'''''set Choosing to -(Choosing)'''''</u>. The countdown won't run when the player presses <ESC> and looks through their options (that's what that whole mess of <u>'''''if (MenuMode 1004)'''''</u>... is for). This won't disturb other menus, because the countdown is reset whenever a new menu is displayed. So, once the other mod's menus are out of the way, your menu will be shown again. | ||
[[Category: Unfinished Articles]] |