Example Script :
Say("A","111");Say("B","222");Say("A","333"); // <--- user choose save here, I pause the script and save // the context into a data file, when the game load the save data next time, It // will srart here.Say("B","444");
I think I need some methods to save a suspended context :
Example code :
saving :
frame : ncontext->Execute(); --------call-------> context->Suspend(); // now the script is suspended without finish.if (needsaving){ contextMemoto = context->GetMemoto(); contextMemoto->save(buffer);}frame : n + 1context->Execute(); // resume the context execute;
loading :
frame : kcontextMemoto->load(buffer);context->SetMemoto(contextMemoto);// the context and engine 's status = saving code frame n's context statuscontext->Execute();
Thank you . sorry for my english. Hope you understand me.
[Edited by - Yuki001 on June 1, 2010 9:18:41 AM]