Hi guys, I'm back with another question! So recently I've been trying to implement
saving and loading into my game, based upon
this tutorial. Now all is good - I've set up a save point, I can save and load from it - except for one problem:
item collectors do not persist after loading a game.
I'd like it so that the player collects an item, and that item remains collected after loading. Here's a list of my save game settings, although I believe that everything is in order:
I have also
inspected the XML file that is generated as the save file, and it appears that the data
is being saved, so I'm not sure what I'm missing.
Could anyone confirm that this is working in their game? If so, could you suggest some settings I might have missed?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Another thing I just noticed is that when the save point dialogue appears (i.e. before I actually try and load a game), the following error is displayed in the console:
Error while parsing XML data: at System.String.IndexOf (Char value, Int32 startIndex, Int32 count) [0x00013] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/String.cs:1114
at ORKFramework.XML.XMLParser.Parse () [0x00000] in <filename unknown>:0
UnityEngine.Debug:LogError(Object)
ORKFramework.XML.XMLParser:Parse()
ORKFramework.XML.XMLParser:Parse()
ORKFramework.XML.XMLParser:Parse()
ORKFramework.XML.XMLParser:Parse()
ORKFramework.XML.XMLParser:Parse()
ORKFramework.SaveGameHandler:LoadFile(Int32)
ORKFramework.SaveGameHandler:CreateFileInfo(Int32)
ORKFramework.SaveGameHandler:CreateInfos()
ORKFramework.Behaviours.SavePoint:StartEvent(GameObject)
ORKFramework.Behaviours.BaseInteraction:StartMoveToInteraction(GameObject)
ORKFramework.Behaviours.BaseInteraction:Interact()
ORKFramework.Behaviours.InteractionController:Interact()
ORKFramework.ControlHandler:CheckInteractions(GameObject)
ORKFramework.ControlHandler:Tick()
ORKFramework.ORKCore:FireTick()
ORKFramework.ORKHandler:Update()
Could it be that this is related? I can upload the save file too if that would help. Thanks so much for all your help so far.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Just an idea, this may be a point worth clarifying in the documentation in a future update.
Thanks for putting me on the right track!
Which ORK version are you using?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I'm using 2.7.0, although I have made some changes to the ORK source code - perhaps it's possible that some of the changes I've made have had a knock-on effect elsewhere, although I can't think of any likely candidates.
I can always package up a demo project, if you'd like to take a closer look at things. Although I realise you're probably very busy with grid battle systems and stuff :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!