Forum rules - please read before posting.

Crossfading between menus not working after a Loaded Game

edited November 2019 in Technical Q&A

Hello everyone,

I have been reworking my menu system recently (after finishing the bulk of my game, yay! (just gotta record the dialogue)). I have encountered a strange issue and I simply can't get to the bottom of it. Allow me to lay it out:

Pause Menu consists of 3 buttons, each crossfading to their corresponding Menus:

  1. Resume Game = Resumes Gameplay
  2. Save Game = Crossfades to Save List Menu
  3. Quit = Crossfades to a menu that asks if the player would like to quit game without saving

If I start a new game, I can click on the Pause button, which crossfades to the Pause Menu outlined above. Then when I click on the different buttons, they all crossfade to their appropriate menus. This is correct.

However, if I load a game, I can click on the Pause button, which crossfades to the Pause Menu outlined above, BUT... then the three buttons (Resume Game, Save Game, and Quit) all just resume gameplay. It's like they are all "Resume Game" buttons. Super strange.

You can take a look at some washed-out low-res gifs of this here: https://imgur.com/a/PSngJXK

Things I have tried:

  • Starting a new game, saving it, then loading it. Behavior remains.
  • Checked for any action lists "when turn on" or "when turned off" on any of the menus. None.
  • Investigated Load Game menu... no action lists associated with it whatsoever.
  • I looked into the save script... but I'm no coder so... I gave up. Sorry.

Is this a behavior anyone has had? Any help would be much appreciated. Let me know if you need more info. Thanks!

Comments

  • Strange, indeed. What are your AC and Unity versions?

    How do the cross-fades actually occur? Are your Pause menu's Buttons set to crossfade to each menu, or are they set to run ActionLists that handle the crossfading via a pair of Menu: Change state Actions? It may be worth switching to the latter, if the former is true.

    Let's see screenshots of the Pause menu's properties, as well as that of the Save/Quit buttons, in the Menu Manager.

    Try also temporarily switching over to the default interface by setting your Menu Manager's asset file to Default_MenuManager. This also has crossfading between Pause and Save/Load/Options - is the behaviour still wrong, or is it then correct?

  • Thank you Chris. Much appreciated response. I solved the issue when I compared my Pause menu settings against the Default_MenuManager.

    The Default_MenuManager has Appear Type: On Input Key. I didn't want the user to be able to turn on the Pause Menu via input key, so I chose Appear Type: Manual. Apparently this is the culprit of this strange behavior.

    Once I set it to Appear Type: On Input Key, it worked! The behavior now works correctly. I just cleared out the space where the input key says "Menu", so the player still cannot turn on the Pause Menu via the input key.

    There you have it. I appreciate you responding here in the forum, and I apologize for taking your up your time. I will endeavor to check my own settings against the Default settings the next time I run into an issue. Thanks!

  • @ChrisIceBox I wanted to follow up one more time. When I checked back later today, the strange issue I described persisted. I am using AC 1.69.5 and Unity 2019.3.0b12.

    That said, I followed your advice about using action lists instead, and this "solves" the issue. I did run into the same "SaveButton is invisible" issue that this developer did in this article: https://adventurecreator.org/forum/discussion/9519/pausegame-menu-save-submenu-is-visible-problem#latest. However, I followed your directions in your comments at that article, and set my action lists to "Run in Background" and the "Save" button does not disappear. As you said, if there is an action list running in the background, the Save button will not appear.

    I think I'm all good. I wasn't able to truly solve the issue, just find a work around. I find that the action lists don't feel quite as smooth as crossfading in this instance, but it works. And that's what is most important.

    I appreciate your hard work and attention to detail. Enjoy the rest of the weekend and have a nice week ahead. Thanks!

  • The Menu's appear type shouldn't affect the behaviour of elements within it. If you would like to PM me a .unitypackage file of your Manager asset files, I'll see if I can recreate the issue.

    On the topic of ActionLists, you should be able to use them to recreate the same crossfading effect. Are you checking Wait until finish? in the Menu: Change state Action that closes the first menu?

  • @ChrisIceBox Thank you so much for your response. The reason I didn't check Wait until finish? is because the backgrounds for both menus are not transparent overlays. So, when you check that box, the gameplay screen flashes for a split second when transitioning from one menu to the next. Therefore, I just have it do it automatically. No transition, no fade.

    About PMing you, sure thing. I'll send it now. I appreciate you looking into this.

  • I'm afraid I get no such issue - though I did first have to set the Pause menu's Appear type back to Manual, and the Button type fields back to Crossfade. It also wasn't clear how you're loading games, so I used a Save: Save or load Action.

    Doing all this, however, caused the Pause menu buttons to work correctly after loading.

    The reason I didn't check Wait until finish? is because the backgrounds for both menus are not transparent overlays. So, when you check that box, the gameplay screen flashes for a split second when transitioning from one menu to the next

    I'm afraid I don't follow. At what point does the screen "flash"? In between the two menus? Instead of waiting for the Menu to fade out, you can insert an Engine: Wait Action to wait for a little less than it's transition time.

  • Thank you again for following up. Cool. I did exactly as you did: Pause menu's Appear Type set to Manual, and the Button type fields back to Crossfade. All the buttons work!

    However, I am still experiencing the gameplay briefly showing (and this happens when the Button Types are set to Crossfade and when I use action lists with Wait Until Finish checked. You can see this behavior here:

    Even fading between these menus via action lists causing this behavior (ever so briefly).

    I very much appreciate your help! I don't want to take any more of your time, especially since you were not able to replicate it. No worries. I have a viable work around that I am happy with.

    Once again, Adventure Creator is the best Unity asset out there. Looking forward to using it when I start my next project (a Mario-like platformer continuing the same story). I'm sure to use it along with some other assets. Take care Chris. Enjoy the week!

  • Thanks for the elaboration. So the background image is part of the menu itself?

    There's a couple of things you can do:

    1. Define a "Pause background texture" at the top of the Menu Manager, which will display underneath any menus that pause the game. This should remain when crossfading between pausing menus - and is used by the 2D Demo.
    2. Move the background image to a separate Menu and turn that on/off at the same time that you control the other menus - though this would require you to rely on ActionLists than the crossfading feature.
  • Incredible. Absolutely incredible. How have I used Adventure Creator for 5+ years and it's just now that I'm seeing the "Pause Background Texture"???

    I must be blind. I appreciate the follow-up and I will do as instructed. Thanks!!!!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.