

function onBegin()
    
    disableMovement()
    disablePause ()

    setFlag("nightA",true)
    wait(1)
    
    local darkness = getDarkness()
    while (true) do
        wait(0.01)
        darkness = darkness - 0.02
        setDarkness (darkness)
        if darkness < 0.02 then
            break
        end
    end
    
    enableMovement()
    enablePause ()
    endCutscene ()

end