Search Unity

Start Menu - Lack of Functionality After Auxiliary Menu Disappears

Discussion in 'Scripting' started by ElectronicMotion, Dec 2, 2013.

  1. ElectronicMotion

    ElectronicMotion

    Joined:
    Jul 28, 2012
    Posts:
    45
    I am Utilizing Unityscript

    Hello,

    I have constructed a (I'll be honest) pretty good start game menu so far. Below are some pictures that I hope will help people understand. The picture showing Buttons on the right is the Main Menu, utilizing MainMenuItem[] and the MenuManager scripts. The picture showing Buttons on the left is an auxiliary menu for Franchise Mode, utilizing FranMenuItem[] and the FranManager scripts.

    Main Menu - Full Functionality
    $MainMenu.png

    ---------------------------------------------------------------------------------------------------------------------------------------------

    Auxiliary Menu - Franchise Mode Menu Options (Unfinished) - Full Functionality
    $MainMenuFran.png


    Initially, I attempted to introduce code for the FranManager into the MenuManager script, because I thought that it would make a loop, but this cause bugs with actually being able to scroll the menu with the analog gamepad, so it was moved to it's own script. So far, it works as intended, but when I press "Y" or "A" on return to Main Menu, I am stuck at the currentMenuItem being set to 1, and the gamepad is not responsive.

    The simple solution is to reload the scene, but this would make video and audio restart as well, unless there's a piece of script that allows carry over (I'm sure there is). Does anyone know a better, more simple way, or do I have to restructure this and make room for Coroutines?

    Code is below for reference. I'm including all four....

    Number 1: MainMenuItem.js
    Code (csharp):
    1.  
    2. #pragma strict
    3. var hoverTexture:Texture;
    4. var regularTexture:Texture;
    5.  
    6. var selectAudio:AudioSource;
    7.  
    8. function OnSelected(on:boolean) {
    9.     if(on) {
    10.         renderer.material.mainTexture = hoverTexture;
    11.         selectAudio.Play(0);
    12.         }
    13.     else {
    14.         renderer.material.mainTexture = regularTexture;
    15.     }
    16. }
    17.  
    Number 2: MenuManager.js
    Code (csharp):
    1.  
    2. #pragma strict
    3. var menuItems:MainMenuItem[];
    4. var currentMenuItem: int = 0;
    5. var lastMenuItem: int = 4;
    6. var keyDelay:float = 0.25;
    7.  
    8. var franItems:FranMenuItem[];
    9. var currentFranItem: int = 0;
    10. var lastFranItem: int = 2;
    11.  
    12. var optItems:OptMenuItem[];
    13. var currentOptItem: int = 0;
    14. var lastOptItem: int = 2;
    15.  
    16. var abtItems:AbtMenuItem[];
    17. var currentAbtItem: int = 0;
    18. var lastAbtItem: int = 2;
    19.  
    20. var enterAudio:AudioSource;
    21. var softenterAudio:AudioSource;
    22.  
    23. var MainMenu:GameObject;
    24. var tourMode:GameObject;
    25. var franMode:GameObject;
    26. var optionsMode:GameObject;
    27. var aboutMode:GameObject;
    28. var exitMode:GameObject;
    29.  
    30. var FranMenuHidden:GameObject;
    31. var newFran:GameObject;
    32. var loadFran:GameObject;
    33. var returnF:GameObject;
    34.  
    35. var OptionsMenuHidden:GameObject;
    36.  
    37.  
    38. var AboutMenuHidden:GameObject;
    39.  
    40.  
    41. function Start () {
    42.     MainMenu.SetActive(true);
    43.    
    44.     if(MainMenu) {
    45.     iTween.MoveFrom(tourMode, iTween.Hash("y", 10, "time", 6));
    46.     iTween.MoveFrom(franMode, iTween.Hash("y", 10, "time", 5));
    47.     iTween.MoveFrom(optionsMode, iTween.Hash("y", 10, "time", 4));
    48.     iTween.MoveFrom(aboutMode, iTween.Hash("y", 10, "time", 3));
    49.     iTween.MoveFrom(exitMode, iTween.Hash("y", 10, "time", 2));
    50.  
    51.     menuItems[currentMenuItem].OnSelected(true);
    52.     var lastMenuItem:int = currentMenuItem;
    53.     while(true) {
    54.         if(Input.GetAxisRaw("LAV") > 0.9) {
    55.             lastMenuItem = currentMenuItem;
    56.  
    57.             currentMenuItem --;
    58.            
    59.             if(currentMenuItem == -1)
    60.                 currentMenuItem = 4;
    61.             if(lastMenuItem != currentMenuItem) menuItems[lastMenuItem].OnSelected(false);
    62.                 menuItems[currentMenuItem].OnSelected(true);       
    63.            
    64.             yield new WaitForSeconds(keyDelay);
    65.            
    66.         }
    67.         else if(Input.GetAxisRaw("LAV") < -0.9) {
    68.             lastMenuItem = currentMenuItem;
    69.            
    70.             currentMenuItem ++;
    71.            
    72.             if(currentMenuItem == 5)
    73.                 currentMenuItem = 0;
    74.             if(currentMenuItem >= menuItems.Length) currentMenuItem = menuItems.Length - 1;
    75.             if(lastMenuItem != currentMenuItem) menuItems[lastMenuItem].OnSelected(false);
    76.             menuItems[currentMenuItem].OnSelected(true);
    77.  
    78.             yield new WaitForSeconds(keyDelay);
    79.            
    80.             }
    81.            
    82.             yield;
    83.            
    84.            
    85.             //A Button Input (PSX Input = X)
    86.             if(Input.GetButtonDown("A")) {
    87.                 if(currentMenuItem == 0) { //Tour of Champions Selected
    88.                     enterAudio.Play(1);
    89.                     Debug.Log("Add link to Tour Menu");
    90.                     }
    91.                 if(currentMenuItem == 1) { //Franchise Selected
    92.                     softenterAudio.Play(2);
    93.                     Debug.Log("Franchise=true");
    94.                         MainMenu.SetActive(false);
    95.                         OptionsMenuHidden.SetActive(false);
    96.                         AboutMenuHidden.SetActive(false);
    97.                             FranMenuHidden.SetActive(true);
    98.                     }
    99.            
    100.                 if(currentMenuItem == 2) { //Options Selected
    101.                     softenterAudio.Play(2);
    102.                     Debug.Log("Show Options Menu");
    103.                     //OptionsMenuHidden = true;
    104.                         //iTweens!
    105.                     //FranMenuHidden = false;
    106.                     //AboutMenuHidden = false;
    107.                     }
    108.                 if(currentMenuItem == 3) { //About Selected
    109.                     softenterAudio.Play(2);
    110.                     Debug.Log("Show About Options Menu");
    111.                     //AboutMenuHidden = true;
    112.                         //iTweens!
    113.                     //OptionsMenuHidden = false;
    114.                     //FranMenuHidden = false;
    115.                     }
    116.                 if(currentMenuItem == 4) { //Exit Selected
    117.                     enterAudio.Play(1);
    118.                     Debug.Log("Popup Exit GUI Box");
    119.                     //GUI Popup Box
    120.                         //Buttons
    121.                             //Application.Quit();
    122.                     }
    123.                
    124.             }
    125.         }
    126.     }
    127. }
    128.  
    Number 3: FranMenuItem (Basically the Same as MainMenuItem)
    Code (csharp):
    1.  
    2. #pragma strict
    3. var hoverTexture:Texture;
    4. var regularTexture:Texture;
    5.  
    6. var selectAudio:AudioSource;
    7.  
    8. function OnSelected(on:boolean) {
    9.     if(on) {
    10.         renderer.material.mainTexture = hoverTexture;
    11.         selectAudio.Play(0);
    12.         }
    13.     else {
    14.         renderer.material.mainTexture = regularTexture;
    15.     }
    16. }
    17.  
    Number 4: FranManager (Again, Basically the Same as MenuManager)
    Code (csharp):
    1.  
    2. #pragma strict
    3.  
    4. var franItems:FranMenuItem[];
    5. var currentFranItem: int = 0;
    6. var lastFranItem: int = 2;
    7. var keyDelay:float = 0.25;
    8.  
    9. var menuItems:MainMenuItem[];
    10. var currentMenuItem: int = 0;
    11. var lastMenuItem: int = 4;
    12.  
    13. var enterAudio:AudioSource;
    14. var softenterAudio:AudioSource;
    15.  
    16. var MainMenu:GameObject;
    17. var tourMode:GameObject;
    18. var franMode:GameObject;
    19. var optionsMode:GameObject;
    20. var aboutMode:GameObject;
    21. var exitMode:GameObject;
    22.  
    23. var FranMenuHidden:GameObject;
    24. var newFran:GameObject;
    25. var loadFran:GameObject;
    26. var back:GameObject;
    27.  
    28. function Start () {
    29.  
    30.     iTween.MoveFrom(newFran, iTween.Hash("y", -5, "time", 1));
    31.     iTween.MoveFrom(loadFran, iTween.Hash("y", -5, "time", 2));
    32.     iTween.MoveFrom(back, iTween.Hash("y", -5, "time", 3));
    33.                        
    34.     franItems[currentFranItem].OnSelected(true);
    35.     var lastFranItem:int = currentFranItem;
    36.     while(true) {
    37.         if(Input.GetAxisRaw("LAV") > 0.9) {
    38.             lastFranItem = currentFranItem;
    39.  
    40.             currentFranItem --;
    41.            
    42.             if(currentFranItem == -1)
    43.                 currentFranItem = 2;
    44.             if(lastFranItem != currentFranItem) franItems[lastFranItem].OnSelected(false);
    45.                 franItems[currentFranItem].OnSelected(true);
    46.            
    47.             yield new WaitForSeconds(keyDelay);
    48.            
    49.         }
    50.         else if(Input.GetAxisRaw("LAV") < -0.9) {
    51.             lastFranItem = currentFranItem;
    52.            
    53.             currentFranItem ++;
    54.            
    55.             if(currentFranItem == 3)
    56.                 currentFranItem = 0;
    57.             if(currentFranItem >= franItems.Length) currentFranItem = franItems.Length -1;
    58.             if(lastFranItem != currentFranItem) franItems[lastFranItem].OnSelected(false);
    59.                 franItems[currentFranItem].OnSelected(true);
    60.                    
    61.             yield new WaitForSeconds(keyDelay);
    62.                    
    63.             }
    64.            
    65.         yield;
    66.        
    67.         if(Input.GetButtonDown("A")) {
    68.             if(currentFranItem == 0) {
    69.                 //Application.LoadLevel("AvatarSelect");
    70.                 Application.LoadLevel("FCorpsSelectMenu");
    71.             }
    72.             if(currentFranItem == 1) {
    73.                 //Application.LoadLevel("SavedGames");
    74.             }
    75.             if(currentFranItem == 2) {
    76.                 Debug.Log("Back to Main Menu");
    77.                 FranMenuHidden.SetActive(false);
    78.                     franItems[currentFranItem].OnSelected(false);
    79.                 MainMenu.SetActive(true);
    80.                     menuItems[currentMenuItem].OnSelected(true);
    81.                    
    82.                 yield new WaitForSeconds(keyDelay);
    83.             }
    84.            
    85.             yield new WaitForSeconds(keyDelay);
    86.         }
    87.        
    88.         if(Input.GetButtonDown("Y")) {
    89.             Debug.Log("Back to Main Menu");
    90.             FranMenuHidden.SetActive(false);
    91.                 franItems[currentFranItem].OnSelected(false);
    92.             MainMenu.SetActive(true);
    93.                 menuItems[currentMenuItem].OnSelected(true);
    94.                
    95.            
    96.                
    97.             yield new WaitForSeconds(keyDelay);
    98.         }
    99.     }
    100. }
    101.  
    BTW- If you're wondering why I declare so many variables, it's because I've been testing a lot of things out, and it helps me debug each time I run into a problem.

    -Sam, Student of Programming, Writer of Bugs
     
  2. karljj1

    karljj1

    Joined:
    Feb 17, 2011
    Posts:
    440
    Quite a lot of code for people to read through ;)

    When a user presses Y in the FranManager and goes back to the main menu do you still want your FranManager coroutine running? I would think you would want to stop it or disable the script?

    Code (csharp):
    1.  
    2.  
    3.         if(Input.GetButtonDown("Y")) {
    4.             Debug.Log("Back to Main Menu");
    5.             FranMenuHidden.SetActive(false);
    6.                 franItems[currentFranItem].OnSelected(false);
    7.             MainMenu.SetActive(true);
    8.                 menuItems[currentMenuItem].OnSelected(true);
    9.  
    10.             break; // exit while loop
    11.             // OR
    12.             enabled = false;
    13.  
     
    Last edited: Dec 2, 2013
  3. ElectronicMotion

    ElectronicMotion

    Joined:
    Jul 28, 2012
    Posts:
    45
    Yes, it is a lot of code... I am sorry for that, but I didn't want to leave anything out.

    I just want to say, KarlJJ, I am 100% appreciative of your response. It means so much when I get feedback and help. As I'm writing this, I'm attempting the code you've written. My programmer friend just pulled out the Noob jokes when I told him my issue. He said all it would take would be a Return Loop, but, seeing as how the only loops I've used thus far have been in script and dealing with AudioSources and MovieTextures, I don't have any idea how to write a return loop that would return the FranManager's Y (or Return) Button press coroutine(s) to the MenuManager's Start Function. I'm trying, but I'll see if this will work, and if disabling this script will return to MenuManager by default...

    And... while it stops the FranManager script and that is a help, it doesn't solve the underlying issues, which is setting up a loop, back to the initial script of MenuManager. So, I basically need help setting up a return from FranManager to the start of MenuManager. Any suggestions?


    PS: Rest assured, once I figure this issue out, I'm posting the complete solution here on the forums, because I'm sure someone will need help on this same issue.
     
  4. karljj1

    karljj1

    Joined:
    Feb 17, 2011
    Posts:
    440
    Hi,

    Just had a look through your code.

    I think i have found your problem. When you deactivate a component you kill its coroutines. Your menu relies on the Start function being a coroutine.
    A simple fix is to use the OnEnable and OnDisable functions to stop/start your menu coroutines.

    Code (csharp):
    1.  
    2.     function OnEnable()
    3.     {
    4.         StartCoroutine( "ShowMenu" );
    5.     }
    6.  
    7.  
    8.     function OnDisable()
    9.     {
    10.         StopCoroutine( "ShowMenu" );
    11.     }
    12.      
    13.     function ShowMenu () { // This was your Start function.
    14.    .....
    15.    }
    16.  
     
  5. ElectronicMotion

    ElectronicMotion

    Joined:
    Jul 28, 2012
    Posts:
    45
    That seems to be a step closer...

    I'm still having issues, and by this time wondering if I'm brain dead or about to go insane...

    Here is the restructured code:

    MenuManager(Starting Menu)

    Code (csharp):
    1.  
    2. #pragma strict
    3. var menuItems:MainMenuItem[];
    4. var currentMenuItem: int = 0;
    5. var lastMenuItem: int = 4;
    6. var keyDelay:float = 0.25;
    7.      
    8. var enterAudio:AudioSource;
    9. var softenterAudio:AudioSource;
    10.      
    11. var MainMenu:GameObject;
    12. var tourMode:GameObject;
    13. var franMode:GameObject;
    14. var optionsMode:GameObject;
    15. var aboutMode:GameObject;
    16. var exitMode:GameObject;
    17.      
    18. var FranMenuHidden:GameObject;
    19. var OptionsMenuHidden:GameObject;
    20. var AboutMenuHidden:GameObject;
    21.  
    22. var franScript:FranManager;
    23. //var optScript:OptManager;
    24. //var abtScript:AbtManager;
    25.  
    26.      
    27. function Start () {
    28.     StartCoroutine("MainScrollEnable");
    29. }
    30.  
    31. function MainScrollEnable () {
    32.         iTween.MoveFrom(tourMode, iTween.Hash("y", 10, "time", 6));
    33.         iTween.MoveFrom(franMode, iTween.Hash("y", 10, "time", 5));
    34.         iTween.MoveFrom(optionsMode, iTween.Hash("y", 10, "time", 4));
    35.         iTween.MoveFrom(aboutMode, iTween.Hash("y", 10, "time", 3));
    36.         iTween.MoveFrom(exitMode, iTween.Hash("y", 10, "time", 2));
    37.     StartCoroutine("ShowMenu");
    38. }
    39.  
    40. function MainScrollDisable() {
    41.         iTween.MoveTo(tourMode, iTween.Hash("y", -6, "time", 6));
    42.         iTween.MoveTo(franMode, iTween.Hash("y", -8, "time", 6));
    43.         iTween.MoveTo(optionsMode, iTween.Hash("y", -10, "time", 6));
    44.         iTween.MoveTo(aboutMode, iTween.Hash("y", -12, "time", 6));
    45.         iTween.MoveTo(exitMode, iTween.Hash("y", -14, "time", 6));
    46.     StopCoroutine("ShowMenu");
    47. }
    48.  
    49. function ShowMenu () {
    50.     menuItems[currentMenuItem].OnSelected(true);
    51.     var lastMenuItem:int = currentMenuItem;
    52.     while(true) {
    53.         if(Input.GetAxisRaw("LAV") > 0.9) {
    54.             lastMenuItem = currentMenuItem;
    55.      
    56.             currentMenuItem --;
    57.                
    58.             if(currentMenuItem == -1)
    59.                 currentMenuItem = 4;
    60.             if(lastMenuItem != currentMenuItem) menuItems[lastMenuItem].OnSelected(false);
    61.                 menuItems[currentMenuItem].OnSelected(true);
    62.                
    63.             yield new WaitForSeconds(keyDelay);
    64.  
    65.         }
    66.         else if(Input.GetAxisRaw("LAV") < -0.9) {
    67.             lastMenuItem = currentMenuItem;
    68.                
    69.             currentMenuItem ++;
    70.                
    71.             if(currentMenuItem == 5)
    72.                 currentMenuItem = 0;
    73.             if(currentMenuItem >= menuItems.Length) currentMenuItem = menuItems.Length - 1;
    74.             if(lastMenuItem != currentMenuItem) menuItems[lastMenuItem].OnSelected(false);
    75.                 menuItems[currentMenuItem].OnSelected(true);
    76.                
    77.             yield new WaitForSeconds(keyDelay);
    78.  
    79.         }
    80.        
    81.         yield;
    82.        
    83.     }
    84.    
    85. }
    86.  
    87. function Update () {
    88.     if(Input.GetButtonDown("A")) {
    89.         if(currentMenuItem == 0) { //Tour of Champions Selected
    90.             enterAudio.Play(1);
    91.             Debug.Log("Add link to Tour Menu");
    92.         }
    93.         if(currentMenuItem == 1) { //Franchise Selected
    94.             softenterAudio.Play(2);
    95.             Debug.Log("Franchise=true");
    96.                 FranMenuHidden.SetActive(true);
    97.                 return franScript.StartCoroutine("FranScrollEnable");
    98.         }
    99.         if(currentMenuItem == 2) { //Options Selected
    100.             softenterAudio.Play(2);
    101.             Debug.Log("Show Options Menu");
    102.         }
    103.         if(currentMenuItem == 3) { //About Selected
    104.             softenterAudio.Play(2);
    105.             Debug.Log("Show About Options Menu");
    106.         }
    107.         if(currentMenuItem == 4) { //Exit Selected
    108.             enterAudio.Play(1);
    109.             Debug.Log("Popup Exit GUI Box");
    110.                 //GUI Popup Box
    111.                     //Buttons
    112.                         //Application.Quit();
    113.         }
    114.     }
    115. }
    116.  
    FranManager(Auxiliary)
    Code (csharp):
    1.  
    2. #pragma strict
    3. var franItems:FranMenuItem[];
    4. var currentFranItem: int = 0;
    5. var lastFranItem: int = 2;
    6. var keyDelay:float = 0.25;
    7.      
    8. var enterAudio:AudioSource;
    9. var softenterAudio:AudioSource;
    10.      
    11. var MainMenu:GameObject;
    12. var tourMode:GameObject;
    13. var franMode:GameObject;
    14. var optionsMode:GameObject;
    15. var aboutMode:GameObject;
    16. var exitMode:GameObject;
    17.      
    18. var FranMenuHidden:GameObject;
    19. var newFran:GameObject;
    20. var loadFran:GameObject;
    21. var returnF:GameObject;
    22.  
    23. var mainScript:MenuManager;
    24.  
    25. function FranScrollEnable () {
    26.     Debug.Log("Coroutine FranMenuEnable works!");
    27.         iTween.MoveFrom(newFran, iTween.Hash("y", -5, "time", 1));
    28.         iTween.MoveFrom(loadFran, iTween.Hash("y", -5, "time", 2));
    29.         iTween.MoveFrom(returnF, iTween.Hash("y", -5, "time", 3));
    30.     StartCoroutine("ShowFranMenu");
    31.     return mainScript.StartCoroutine("MainScrollDisable");
    32. }
    33.  
    34. function FranScrollDisable () {
    35.         iTween.MoveTo(newFran, iTween.Hash("y", -10, "time", 3));
    36.         iTween.MoveTo(loadFran, iTween.Hash("y", -10, "time", 2));
    37.         iTween.MoveTo(returnF, iTween.Hash("y", -10, "time", 1));
    38.     StopCoroutine("ShowFranMenu");
    39.     return mainScript.StartCoroutine("MainScrollEnable");
    40. }
    41.  
    42. function ShowFranMenu () {
    43.     franItems[currentFranItem].OnSelected(true);
    44.     var lastFranItem:int = currentFranItem;
    45.     while(true) {
    46.             if(Input.GetAxisRaw("LAV") > 0.9) {
    47.                 lastFranItem = currentFranItem;
    48.      
    49.                 currentFranItem --;
    50.                
    51.                 if(currentFranItem == -1)
    52.                     currentFranItem = 2;
    53.                 if(lastFranItem != currentFranItem) franItems[lastFranItem].OnSelected(false);
    54.                     franItems[currentFranItem].OnSelected(true);
    55.                
    56.                 yield new WaitForSeconds(keyDelay);
    57.                
    58.             }
    59.             else if(Input.GetAxisRaw("LAV") < -0.9) {
    60.                 lastFranItem = currentFranItem;
    61.                
    62.                 currentFranItem ++;
    63.                
    64.                 if(currentFranItem == 3)
    65.                     currentFranItem = 0;
    66.                 if(currentFranItem >= franItems.Length) currentFranItem = franItems.Length -1;
    67.                 if(lastFranItem != currentFranItem) franItems[lastFranItem].OnSelected(false);
    68.                     franItems[currentFranItem].OnSelected(true);
    69.                        
    70.                 yield new WaitForSeconds(keyDelay);
    71.                        
    72.             }
    73.            
    74.             yield;
    75.            
    76.         }
    77.     }
    78.  
    79. function Update () {
    80.     if(Input.GetButtonDown("A")) {
    81.         if(currentFranItem == 0) {
    82.             //Application.LoadLevel("AvatarSelect");
    83.             Application.LoadLevel("FCorpsSelectMenu");
    84.         }
    85.         if(currentFranItem == 1) {
    86.             //Application.LoadLevel("SavedGames");
    87.         }
    88.         if(currentFranItem == 2) {
    89.             Debug.Log("Back to Main Menu");
    90.             StartCoroutine("FranScrollDisable");
    91.         }
    92.     }
    93.     if(Input.GetButtonDown("Y")) {
    94.         Debug.Log("Back to Main Menu");
    95.         StartCoroutine("FranScrollDisable");
    96.     }
    97. }
    98.  
    Problems:

    • Still unable to loop.

    • Update function appears to consider only the MenuManager's Inputs, not the FranManager's Inputs. This may have something to do with the menuItem array still being active, during the FranManager's coroutines, causing illogical progress.

    • When the user presses A on the return button, or Y when the ShowFranMenu is enabled, the FranScrollDisable coroutine is supposed to reactivate the MenuManager and deactivate the FranManager. Instead, a loop in animation and function occurs and the user is stuck in the auxiliary menu side.

    Once again, thanks for your help. I just need to figure this out before I go insane.
     
  6. karljj1

    karljj1

    Joined:
    Feb 17, 2011
    Posts:
    440
    What do you mean loop? Loop the menu so it returns to the top when at the bottom?
     
  7. ElectronicMotion

    ElectronicMotion

    Joined:
    Jul 28, 2012
    Posts:
    45
    No, loop the functionality.

    Example:

    Main Menu Starts, the user scrolls to Franchise Button([1] in menuItems array) and inputs "A". User is taken to (Franchise Menu) auxiliary menu as Main Menu functionality is removed. User scrolls to Return Button([2] in franItems array) and inputs "A". User is taken back to Main Menu function as Franchise (Auxiliary) Menu functionality is removed. User is able to either repeat the process or select other menus (Options, About) or exit the menu...

    This logic loop is the issue that I'm dealing with. It's like Whack-A-Mole... every time I think I've figured it out, I either cause an error or the menu system refuses to understand the logic that I'm giving it. I know it's syntax. I just don't understand why.

    With the inputs... Is is because the Update function is never stopped? How can I stop the Update function?

    I'm working on this, and it's exciting, because I'm working on something I can handle, but at the same time I know the things I'm learning will help me later. Still, I'm thinking about this all the time, I'm working on this every spare chance I get. I just am stuck understanding how to make the logic in my head fit the syntax in the code.