Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
I am sorry, the 0.1 delayedCall doesn't seem to get along well with resting. I will try to find a workaround. So you can't rest with the above system, or game freezes.
One thing that might failed here is if resting resets the delay values. So a player could "get stuck", rest and Wake up really fast, and be "freed". Its late over here, I will have a look tomorrow, along with starting to code my crafting system.