I have an old custom action to extract a specific variable from a save file. This is the relevant bit:
public override float Run ()
{
int saveNumber = AC.GlobalVariables.GetIntegerValue(15);
SaveFile saveFile = KickStarter.saveSystem.GetSaveFile(saveNumber);
List<GVar> saveVars = SaveSystem.ExtractSaveFileVariables(saveFile);
GVar correctVar = null;
foreach (GVar saveVar in saveVars)
{
if (saveVar.id == 13)
{
correctVar = saveVar;
break;
}
}
string saveDay = correctVar.GetValue();
AC.GlobalVariables.SetStringValue(14, saveDay);
return 0f;
}
But I'm not sure how to incorporate the new callback parameter to make this work. I took a look at the scripting guide, but it doesn't seem to be updated yet? If you could point me in the right direction, I'd really appreciate it.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Yes, it uses a callback now in case the process can't be run instantly: