Page 1 of 1

What if delayedScript is pending and the game is saved?

Posted: Mon Nov 16, 2015 5:51 pm
by MrChoke
Not that I have seen this first-hand yet in my dungeon but I may. I use delayedScript calls from time to time. What happens to a delayedScript call waiting to execute if the game is saved before it does? Is this condition saved so that a reload will have the delayedScript waiting pick up where they left off? Wondering if anybody knows.

Re: What if delayedScript is pending and the game is saved?

Posted: Mon Nov 16, 2015 7:35 pm
by petri
Many things in the main campaign would break if this was not handled.

Re: What if delayedScript is pending and the game is saved?

Posted: Tue Nov 17, 2015 12:26 am
by MrChoke
Very good. Just wanted to make sure. Thanks.

Re: What if delayedScript is pending and the game is saved?

Posted: Tue Nov 17, 2015 11:08 pm
by FeMaiden
ouch...I used delayed calls a lot in my mod. Mainly just with the dialogue boxes. I had no idea it could break if someone saved and reloaded in the middle of one. Hopefully nobody does that...

Re: What if delayedScript is pending and the game is saved?

Posted: Tue Nov 17, 2015 11:44 pm
by minmay
FeMaiden wrote:ouch...I used delayed calls a lot in my mod. Mainly just with the dialogue boxes. I had no idea it could break if someone saved and reloaded in the middle of one. Hopefully nobody does that...
It can't break. That's what petri just said.

Re: What if delayedScript is pending and the game is saved?

Posted: Wed Nov 18, 2015 12:50 am
by FeMaiden
minmay wrote:
FeMaiden wrote:ouch...I used delayed calls a lot in my mod. Mainly just with the dialogue boxes. I had no idea it could break if someone saved and reloaded in the middle of one. Hopefully nobody does that...
It can't break. That's what petri just said.
oops, i misinterpreted , i thought he meant, that "we" have to "handle" it or many things would break lol.
never mind.

Re: What if delayedScript is pending and the game is saved?

Posted: Wed Nov 18, 2015 3:46 pm
by Komag
Not sure how exactly it is handled in Grimrock, but likely there is some list with entries of delayed scripts to run, with a timer time attached. This list is saved and reloaded properly, everything simply continues as normal. I do the same thing in my Roku game, but there I can't reset the system clock, so I have to save whatever the current clock is, and make sure to subtract that out when loading. But the principle is the same.