[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua state
- From: "Krzysztof Jakubowski" <kjakubowski@...>
- Date: Thu, 6 May 2004 22:27:56 +0200
Thanks for your answer. You are right. But on the other hand I must make
savegames in my game :) I must save the state of almost all game objects and
also the "position of script execution". This is becouse scripts in my game
are not only event-based. Each mission/level has its own script. The main
action goes linearly and so does the script. When script must wait for
something then its execution is stopped using lua_yeild / lua_resume.
Probably I don't need to save the whole state. I can save only globals. Then
I can just reload the original script and load saved globals. The problem is
that I don't want to execute the script from the beginning, but from the
place it was during saving :) It is also possible that it was in nested lua
function or in loop, so that it is not enought to jump to "line"... How to
do it? If the only way is to study hard lua source code, please give me some
hints :)
Thanks
Krzysiek