Forum rules - please read before posting.

Save system - menu visibility and variable

edited November 2014 in Technical Q&A
I'm not quite sure (I'm yet testing it) but it seems to me that sometimes the saved game doesn't save the global variable and the menu visibility correctly.

I start the game. 
- I do one action that make one MenuElement visible and change a global variable from false to true.
- I load the game, but the menu element doesn't reset (it should go back invisible) and the variable doesn't reset (it stays false and doesn't reset to true).

Comments

  • At what point did you make the save game file you're loading?  If you create a save game, you may find odd behaviour like this if you create variables / menus afterwards, and then loading the save game file.  Did the variable and menu element exist at the time you created the save?
  • edited December 2014
    Yes.

    One important note.

    Manual load works
    When I load the game using the manual load (that is AC.SaveSystem.LoadGame) it works perfectly.

    Load from menu does not work
    When I load the game using a SaveList menu it doesn't work properly.
    The menu visibility are not loaded correctly, and I see that it doesn't load all the variables.


    I've also retried it, having a new save.

    I've a splashscreen menu. When I start the game and manually close the menu it works.

    When I try to load the game from the splash screen menu I see that the game loads all the variables, but the SplashScreen doesn't close (in the saved game the splashscreen was closed).
  • You say it doesn't load all the variables - and then that it does.  What's happening here, exactly?

    I can't recreate your issue with the menu closing.  What's it's Appear type set to?
  • About variables
    Sorry about the variables. The thing solved by itself or it was created from something on my side and now it seems to be working.

    About Menu
    Now I can confirm that menus have a strange behaviour.

    MenuExample - Appear type = Manual

    -> MenuExample is On
    -> Load the Game
    -> MenuExample stays On. Also if it was Off in the loaded game.

    * This doesn't happen for MenuElements, only for menu in general. If a MenuElement was invisible it stays invisible.

    I'll let you know asap if I find more info on this behaviour.

    Meanwhile... is there a command to TurnOff all menu. (Even better if it can TurnOff just the menus with appear type = manual).

    Thank you very much.
  • Is it possible that your Load menu is closing MenuExample when it appears, because it's opened with a Crossfade?

    As for turning off menus - no, you must be specific.  But you can disable the menu system completely by using the Engine: Manage systems Action.
  • The issue is that the MenuExample remains open.
    There's no Load menu and I don't use crossfade at all.

    About closing all menus
    Disabling the entire menu system is not an option.

    I just need to close ALL menus, EXCEPT the HUD menu (that are 3 different menus).
  • If there's no Load menu, what do you mean by "Load the Game"?  I need to be really clear on what exactly is happening here in order to help.
  • edited December 2014
    Ok, technically there's a load menu. It's in the HUD.

    If player clicks a button on the HUD it loads the game.

    There's no crossfading.

    The HUD stays open and its elements are loaded and updated correctly (HUD is always open during the game).

    But the non-HUD menus stays always open (while they were closed in the loaded game).
  • Thank you.  Problem recreated and fixed - should be able to get a 1.41a out shortly.
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.