Getting strings from a save game

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Getting strings from a save game

Post by Foxley »

I'm implementing the save select menu in my game, and I need to be able to read a string (the chosen player name) from each save game and put it on the save select menu. In General Prefs there's an option to save strings, but.... how the heck do you get them? I thought you could store strings into globals but it seems that's not the case. You can "import globals" from a save file, but there's no "import strings".

I did find "string to globals" and "globals to string" in plotdict.xml but it says those commands are deprecated. The question is, deprecated by what? I can't find any appropriate alternatives anywhere in the help file.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Yes, you have to use "string to globals" and "globals to string", there's no other way to do this. So those commands aren't entirely useless. This is the only remaining use that they have.
Note that you should store the length in a separate global.
Post Reply