Hey all,
I've got everything working, except one thing! I have a custom script on objects that handles doors, if they're locked, if they're ever able to open etc. Simple boolean values.
When loading a saved game, these get set back to their defaults as they were when the scene initially loads.
Is there any easy way for me to remember the variables on a custom script?
My other idea was to go through and setup an AC "component variables" on each object, and a "remember variables" on that, and change the script I wrote to reference the component variable state.
If I need to do that, then I'm happy to go through and do it - was just hoping there might be something quicker
Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
A guide to writing custom "Remember" components can be found here.
As you're dealing with simple Bool values, though, relying on Variables / Remember Variables would be easier. To get/set a variable from a Variables component, use:
Thanks, Chris!
I got the custom Remember working ... then was having lock ups because I forgot not all objects are enabled at runtime.
Have switched over to Variables/Remember Variables now instead and it's working perfectly. Thanks again for your help.