-
Hi Score ini file
Is there a way to disable the Hi Score object from saving a file by default? From what I can see, even if I don't specify a file name or directory, it still creates one. Though I can't figure out where it is. I tried searching for it on my computer but I can't find it. I know if I change the save location in the event editor it saves it to the new location. But the hi score object still saves hi scores whether you specify this or not.
So basically, I want to be able to have the hi score object sort out hi scores without actually saving to an ini file unless I specify it to do so.
Edit: Okay it's in the AppData folder, should have figured that. But I can't figure out how to stop it from saving there.
-
Re: Hi Score ini file
Okay, having a big problem. The hi score is only functioning properly when I just let it use the default AppData save location. If I specify my own file path, it overwrites the ini everytime, giving me empty scores. The only event I have on the game over screen with the hi score object is:
Start of Frame:
Set file to Apppath$+"scores.ini"
-
Re: Hi Score ini file
Well I managed to fix it myself using the ini++ object with the hi score object. Kind of confusing for me to explain, but basically I load the ini file with the ini++ object. If there is a hi score, I insert the value into the hi score object and the ini++ object, then save it to the ini file in it's own group. Pretty much, I'm only using the hi score object to initially sort the hi scores. I save the values with the ini++ and insert them when the hi score object first loads. I'm using the same ini file for both the hi score and ini++ objects. But, I'm saving the values into different groups.
Setting the hi score object to use the ini file in the app's directory overwrites the values to the default 0, but it doesn't overwrite the entire file, only it's particular group within the ini file. The ini++ values remain untouched.
That's the only way I could work around it not saving in AppData. It overwrites the hi scores when setting it to the app's directory, but the ini++ object stores the values to feed into the hi score object. I could have used the regular ini object but I plan on encrypting the file so you can't go in and make up a score.
I probably didn't explain that properly and left everyone thoroughly confused. :P
Edit: I think this is probably what's going on in the hi score object example that comes with MMF2. It uses an ini with the hi score object, but I couldn't figure out what it was doing, so I did it from scratch