Skip to content

"Loading Screen": SugarCube (v2.18)#

Summary#

"Loading Screen" demonstrates how the LockScreen.lock() and LockScreen.unlock() functions work in SugarCube. (This example also uses the setTimeout() JavaScript function.)

Example#

Download

Twee Code#

:: StoryTitle
Loading Screen in SugarCube

:: UserScript[script]
// Lock the screen and save the ID
var lockID = LoadScreen.lock();

// Pause for 5 second before unlocking the screen
setTimeout(function(){
    LoadScreen.unlock(lockID);
}, 5000);

:: Start
You can now see this after the long pause!

Twee Download