Forum rules - please read before posting.

Integer variable doesn't reset

Hi!

I have set up a local variable in a scene and set it as an integer. During conversation, it goes up by +1 to count the dialogue options used in order to load a custom line once you've gone through all options for the conversation.

This all works, however if I have a save where the integer is 0, go through the conversation so the integer ends up at e.g. 4, and then load the save prior to having this conversation, the integer doesn't reset back to 0 but stays at 4.

Is this by design and I'm not just using this variable as intended?

Cheers!

Comments

  • No, that should go back to zero.  Is the save file in the same scene, and what versions of Unity / AC are you working with, what platform are you working with / building to, and is this in the Editor or builds?
  • Hi Chris,

    Save file is in the same scene.

    Unity version: 5.4.1f1
    AC: 1.54c

    PC platform, and this happens in the editor, haven't tested in build yet but can if it's of interest.
  • So I don't really know what I did - I just messed around a bit with the specific action lists, and now the issue can't be reproduced anymore.

    Seems to be working as intended now.
  • OK - shout if that changes.
  • Seems like this issue has resurfaced but now affecting something else.

    I've set up a series of events via an ActionList, that will towards the end set on object to invisible and one object to visible. To do this, I've assigned "remember visibility" scripts to both items.

    The action script runs and the "Object: Visibiltiy" ActionList items run as expected. Item A becomes invisible, and Item B becomes visible. After the ActionList is completed, if I load a saved game from just before the list was ran, Item A is still invisible and Item B is visible.

    The obsurd thing is that I have the same types of things set up in multiple places thoughout my game and it's not showing this issue. Just with these two items.

    I've tried deleting them and recreating but the issue remains.

    I'm not even sure how this would be recreated given above.
  • edited November 2016
    To add to above, same issue if instead of modifying object visibility, I try to teleport them away instead. Once I go back to the save just prior to running the action list, the values seem to not reset.

    Tried moving the actionlist from a trigger to a hotspot but didn't make any difference.

    UPDATE:
    Since the last time I created action lists similar to above, I had changed the save game files from "Date Only" to "Time and Date" - changing this back made object visibility work properly when re-loading a scene.

    "Remember Transform" does however not seem to work - so I teleported a character in, had it move to a point, then set it to invisible, re-load the same scene, character is still stading where he moved to before becomming invisible. I can work around that however by instead of making the character invisible, teleport him off scene at the end of the action list.
  • Very strange behaviour.  I can't see how the time display setting would affect the loading of game data.

    Can you create a duplicate of this scene and remove all graphics / geometry except the two problematic RememberVisibility / Transform objects, and the ActionList that changes them?  Assuming running that ActionList manually still causes the issue, PM me the scene file together with your Managers as a single .unitypackage file and I'll look into it.
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.