Multiple save files

For questions about using Classic.

Post » Wed Aug 24, 2011 1:56 am

How do you go about making multiple save files?

All I can think of is making multiple hashtables or arrays and then saving/loading a single one based on a global value.

That would work just fine, but would also be a ton of work. Each tiny little thing I want to load would have to have multiple subevents to see which hashtable to get the data from. That's going to suck.

+Start of frame
+global value = 1
+Hashttable 1 value at key = blah
-destroy item because you already got it.

That * n of save files = cumbersome.


I get the feeling there's some way to automate which hashtable to load from, but I dunno..Like, start a loop, then compare the loop index to the hashtable number (hashtable 1, 2, or 3) then pull the data from it. It's not like they have PVs or anything though >_.

My current project won't have much save data..Just which level you're on and such..but what about larger projects? Does anyone actually do it this way?Tokinsom2011-08-24 02:00:49
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Wed Aug 24, 2011 2:34 am

I usually just load/save to:

apppath+"data\save"+str(variable)

Which could end up being save1 or save5 etc.
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Wed Aug 24, 2011 2:44 am

Deeeeeeeeeeeeeerp.

For whatever reason I was thinking I'd need a separate hashtable for each save file. Maybe I need some sleep ._.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests