Forum rules - please read before posting.

How to remember hotspots when save, and load from another scene? (state remains)

Hello,
It's been a while since I've written here.
I have a problem with save/load and hotspots.

  1. I'm in a scene. I attach the "remember hotspot" function to a hotspot.
  2. After, I deactivate it during the game.
  3. Afterwards, I save the game and go to the main menu in another scene.
  4. From there, I use the Load function to take me to the last save.

And that hotspot is still active... and I think it is because of "Hotspot state on start".

If I load the game from that scene with the hotspot, everything is fine, the game can remember that hotspot. But from different scenes... it can't. Or I miss something.

Thanks a lot!

Comments

  • What are your AC and Unity versions, and in what way are you deactivating it?

    The Remember Hotspot component will save a Hotspot's state based on which layer it is on - not the enabled state of the GameObject. You'll need to be using the "Hotspot: Enable or disable" Action to turn it off, if you're aren't already.

  • V1.71.7

    I turn off the hotspot with "Hotspot: Enable or disable". So I set it on OFF state in one Interaction. And the Hotspot will be set on OFF, even I load the same scene after one save.

    But if I Load the scene from another scene (Main Menu) that hotspot is set to ON at the beginning of the scene.

    So I want it to remember the state of my hotspot. Maybe that should be done globally, not local.

  • edited March 2022

    It seems to work fine, I tested it out.

    Are you sure you are attaching the Remember Hotspot script to the hotspot and not the action interaction object under _Interactions?

    Make sure you are attaching the remember hotspot script on the object that has the Hotspot script to it. If you are using AC's folder structure the hotspots by default are found under Logic > _Hotspots

  • edited March 2022

    100% is at one Hotspot. The remember hotspot function works, for the same scene.
    But from a different scene, when I come back with "Load function", the hotspot is still active.
    And it should be set to OFF. And I think it is because of that "Hotspot state on start"... but is should remember the OFF state anyway.

  • edited March 2022

    It works with AC's default menu that you start with even with the Hotspot state on start set as On. I tried from different scenes as well and it seems to work fine. My AC version is v1.73.8. I haven't tried on the game build yet though so it may be different when you build the game

    You should back up your project and try to update to the latest version if you can. And if that doesn't solve it then I'm thinking it might have to do with your loading function.

    Are you using any custom script? You have your own main menu right? If so then Try using AC's default save and load when you press esc and see if it works.

  • edited March 2022

    100% is at one Hotspot.

    Is this to say that other Hotspots - and Remember components - don't have this issue?

    If so, what other details can you share about this Hotspot? Is it parented to another object that is affected by the save system?

    But if I Load the scene from another scene (Main Menu) that hotspot is set to ON at the beginning of the scene.

    Following your description of the situation, the behaviour you're expecting should be what you get.

    v1.71.7 is an old release, however. I would second the recommendation to test the latest AC release - though in a duplicate project so as not to affect your main project.

  • Yes, that saved the day.

    I don't know what it was from, but after a clean reinstall and update, everything seems to work now.

    I'm sorry I made so much of this topic, but maybe other people will help later, if they encounter the same problem.

    Thank you very much for your help! :smile:

  • No problem - just be aware of the "Upgrade notes" sections in the Changelog, as they'll cover any changes made that may affect your project.

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.