Forum rules - please read before posting.

Load saved game in the same scene where you saved it animations bug.

edited November 2015 in Technical Q&A
My 2d animations are still run beneath or on top of the other animations when loading a saved game while you are still in the same scene.

 So I see that old 2d animation that started to run when I saved the game
and still continues to run when I load this current saved scene with
the default 2d animation.

Why AC doesn't flush all old elements upon load?

For instance I have a 2d animation of a character standing idle. And a 2d
animation of this character raising arm when I click on it. Once I click
on it he starts raising his arm and the idle animation is
hidden(removed, forgoten). If I try to save my game while he raises his
arm and load it after in the same scene I can still see how he still
continues to rais his arm with the default idle animation being played
too.

But everything is fine when I load my saved game from another scene.
Btw. this is an old bug that I noticed but never had time to post it.

AC should flush clean those animations, or sort of quickly load another empty level and then your level.

Comments

  • This isn't so much a bug, but a limitation of how AC handles saving.

    Basically, it's impossible to save/restore the state of animations in Unity with any decent amount of reliabililty.  What might work under one set of very specific conditions won't work for another.  Therefore, AC bypasses all animation handling during the saving/loading of save game files - it's better to not do anything, than to potentially break something.

    That's only to say the process isn't automatic.  It just has to be done manually, by one of two ways:
    1. Create an "On load" Cutscene that re-sets all animations how you see fit.  Characters can be reset simply by using the Reset to Idle method of the Character: Animate Action.  You can also use e.g. the Variable: Check Action to play different animations according to different progress states.
    2. Write a custom Remember script that saves/loads whatever animation data you want.  This does require coding knowledge, but is extremely powerful.
  • edited November 2015
    I know what you mean Chris and I know it too.
    You misunderstood me ther mate..

    No, I don't want AC to save the state of the animations that started, I want them not to remain when I load my saved game when I load, while I'm in the same scene.

    What AC actually does, it keeps playing animations if you started them, then saved the game and loaded your saved game while you are in the same scene (all without changing- moving to another scene)

    But it is all good and works ok once you move to anotehr scene in the game and load your saved game.

    So AC for some reason keeps playing it.


    1. All in one scene with out changing it, quiting the game or anything.
    2. Start an animation.
    3. While the animation is being played save the game.
    4. Load this very save (again not changing the scene or quiting the game).
    5. You can see the animation is still being played - problem.

    But it won't play if you load your saved game from anotehr scene or quit teh game and then load it.
  • As I said, AC won't do anything regarding animations when loading.  You have to specify the animation change explicitly using one of the two methods I described: even if that change is to simply stop the animation from playing.
  • Hmm what makes it to stop playing it when you change a level?
    Perhaps it is possible to implement and stop it being played when loading a saved game in the same scene where you saved your game.
  • edited November 2015
    This is a very big problem for me.
    I have tons of animations, also some game objects like characters, NPC, and other visual elements have more than 3-5 animations and to set everything to default at the start would be a killer. Not to mention some have conditions what animations to run when something is done.

    Is there a way to tell load menu to load some an empty scene and then load qucikly the one that you want to load?
  • That may be a possible compromise. It would have to be optional, since making such a change would screw up existing games.  I can't promise it, but I will have a look.
  • Thanks, it woud save lot's of time. I mean like days.
  • edited November 2015
    Chris I just came acorss Loading Screen (9.6) in the manual.
    Can a feature like this be added to AC, when you load a level from saved games in the load menu?
     (tell load menu to load some an empty scene and then load qucikly the one that you want to load)
    This won't break the existing games.
  • Better to just have a "reload scene when loading game" option, no?
  • edited November 2015
    Thank you Chris. Yes, this would be better, as long as the scene you are currently in and want to laod the saved game you just saved is fully reloaded. So we don't see those animations that keep playing.

    (But obviously we want to keep all changes like variables, removed, added sprites visibility etc whatever we saved,  otherwise what woudl be the point of saving the game if it reloads/resets clean :) )

     However see yourself how it fits in the AC so it doesn't break other stuff and games. You know it better than me.
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.