Forum rules - please read before posting.

Save --> Load stops looping ActionList

Unity 2018.3.6f1 Personal
AC v1.66.7

Similar to another issue I had with looping sounds not resuming after load (which we resolved), this time a looping action list which contains sound and fade sprite nodes, stops running if the game is saved and then loaded.

Comments

  • ActionLists do not get their running states saved and loaded - it's not possible to do so and have things load consistently.

    Upon loading, all ActionLists are stopped - you'll have to re-run the looping ActionList manually via your scene's OnLoad cutscene - or by assigning it in the SavesList element's ActionList after loading field.

  • I see. I suppose looping sounds and sprites like these would be better handled with an animation?

  • If something can be done either via an Animator or Timeline, it's typically best to.

  • edited September 2019

    Following on from this, and separate from looping ActionLists. Since saving does not save the play position within any running Action Lists, I'm getting lots of points during gameplay that when I save, loading cuts short the playing ActionList mid-way through.

    Is this supposed to happen? I have a fair few timed events which the player must use an item whilst a certain sprite is visible or a certain sound is playing.

    Is the general thinking with ActionLists that whilst they are running, the player should never be allowed to save?

  • Saving during a gameplay-blocking cutscene is prevented automatically, and it's up to the scene's OnLoad cutscene to restart/resume any background ActionLists that may be need to be running during gameplay.

    So long as you know what needs to get re-run, it's certainly possible to allow saving during this time. But if things get too complex, you do have the option of preventing saving at any time temporarily with the Engine: Manage systems Action.

  • edited September 2019

    Just got a new bug with a Looping ActionList.

    After saving and loading, a looping ActionList involving SpriteFades is triggered OnLoad. This works and it runs, but the fade is very choppy, almost like it is just going from visible to invisible and back again. It is not choppy before saving and loading.

    fyi - The sprite shown in the action list is the same one on each node and I also am attaching its Inspector.

  • Can you elaborate on what you mean by "choppy"?

    If you're controlling the fading at all times upon loading, it may be that the Remember Visibility component is not strictly necessary - though you should first precede the Actions with one that fades out the sprite instantly, so that the looping always starts from the same state.

    A cleaner way to handle this situation would be to rely purely on Animation to handle the effect - no need for the Sprite Fader component at all.

    By attaching an Animator and creating an Animation for the sprite, you can control it's color's alpha value over time however you wish. That animation can then loop at all times, without any prompt from AC Actions.

    To save the state of this animation, you then only need to attach the Remember Animator component.

  • Thanks. I used a transform action instead and that loads just fine.

    fyi - by choppy I meant that the sprite went through the loop turning from visible to invisible and so on, with no smooth fading.

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.