Forum rules - please read before posting.

Save Games, UI and Assorted Queries

edited December 2015 in Technical Q&A

Hi! It's been a while, but I'm in the polishing stages of my game and have a few questions about some things that have been nagging at me.

1. How do I get Saving and Loading to work properly? Whenever I load  a saved game from another scene, it always jumps to a different camera and forgets any "Run in Background" scripts that it was using, including not playing music. Are there additional options I need to turn on?

This is generally what it looks like when it loads a saved game (the game is paused, half-faded, completely silent, and the wrong camera in this case):

image

2. Is there a way to create a simple "Shopping List" style quest log? At most, I'm only interested in it being a scrap of paper where I can toggle on notes as the game progresses, making it more like a conversation-style GUI than a journal. Any pointers in how to approach this would be appreciated. (Example below)
image

3. How would I align text in the conversation GUI to handle overflow text without overlapping? 

image

4. Similarily, how do I build subtitles from the bottom up? Even with "Lower Center" and "Auto-Adjust Height" selected, they tend to start from the top of the GUI, closer to the center of the screen in this case. If I start them lower, they just fall off the bottom of the screen.

image

5. And finally, my background music resets whenever I skip a cut-scene or pause the game.  Is there a way to have it continue playing over these instances?

Any help in these five matters would be greatly appreciated! Let me know if you need any additional information. Thanks!

Comments

  • If you can, please post future questions in separate threads, as it will help out those with similar questions when searching.

    1) You need to tag up objects that you wish to save with the appropriate script.  See Section 9.2 of the Manual.  For example, to save a Sound's state, you attach the "Remember Sound" component.  The v1.50 update will give you the option to automate the process, however the principles involved should still be understood.

    Cameras, however, do not need anything saved (as no data is actually changed mid-game).  In cases like this, only the "reference" to them needs to be saved.  AC will basically ask "which camera is active?" when saving, so you must attach a "Constant ID" component to any Camera that can be active when the game is saved.  This script assigns the object it's attached to a unique ID number that is used in save game files.  Again, this will be automated in v1.50.

    Animation and ActionLists, however, cannot be saved due to their complexity.  Therefore, they must be set up manually within your "On Load" Cutscene, as listed in the Scene Manager.  This Cutscene will be run whenever the scene is loaded, so should be used to set up any additional states that the Remember scripts cannot handle.  It is also possible to write your own Remember scripts so that you can save exactly what you want.

    2) Not easy within AC itself. You could try doing an inventory-based Journal, whereby each "quest" is an inventory item sorted into a separate category, and displayed in a separate Inventory menu (the InventoyBox element that lists items can be set to limit display to items of a certain category).  The alternative would be to make use of a dedicated asset on Unity's Asset Store.  If you needed to trigger/complete quests in a separate asset within AC, you can write a custom Action that links the two together.  See this tutorial.

    3/4) AC's menu system is admittedly quite basic when it comes to visuals, so it's recommended to use it more for prototyping than when you need something polished.  Unity's own UI system is far more flexible, and plugs into AC very easily.  You still use AC's Menu Manager - just not the style options.  You can read a tutorial about that here.

    5) What version of Unity and AC are you using?

  • 5) *checks versions, then sheepishly updates everything*

    Music works now!

    1) The IDs and Remembers seem to do the job!

    2/3/4) Thanks for letting me know. I wasn't sure if I was overlooking anything in AC. I'll dive into Unity's UI this week to take a look at these and try what you suggested.

    Thanks again, Chris! I'll be sure not to post any more bug lists in the future.


  • Look forward to seeing the game!  Are we finally getting a game starring Mr Pennypincher?

  • Thanks! And if by pinching pennies, you mean stealing one from someone's tip jar, then yes. It's certainly that game!  :)
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.