What if delayedScript is pending and the game is saved?
What if delayedScript is pending and the game is saved?
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?
Many things in the main campaign would break if this was not handled.
Re: What if delayedScript is pending and the game is saved?
Very good. Just wanted to make sure. Thanks.
Re: What if delayedScript is pending and the game is saved?
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?
It can't break. That's what petri just said.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...
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: What if delayedScript is pending and the game is saved?
oops, i misinterpreted , i thought he meant, that "we" have to "handle" it or many things would break lol.minmay wrote:It can't break. That's what petri just said.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...
never mind.
Re: What if delayedScript is pending and the game is saved?
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.
Finished Dungeons - complete mods to play