function onBegin()
	if not getFlag("cakemaking") then
		disableRetry()
		disableMovement()
		say("endercellbd_06")
	    setFlag("movenight", true)
	    wait(4)
	    walk(16)
	    say("endercellbd_07")
	    setFlag("nightfall", true)
	    walk(16)
	    wait(2)
	    say("endercellbd_08")
	    walk(16)
	    wait(2)
	    say("endercellbd_09")
	    walk(16)
	    wait(2)
	    say("endercellbd_10")
	    walk(16)
	    wait(2)
	    say("endercellbd_11")
	    setFlag("movenight", false)
		wait(3)
	    say("endercellbd_12")
		enableMovement()
		enableRetry()
		setFlag("cakemaking", true)
		player.ForceCameraUpdate = true
	end
end



function onEnd(level, wasSkipped)
	if wasSkipped then
		setFlag("nightfall", true)
		setFlag("movenight", false)
		setFlag("cakemaking", true)
		player.ForceCameraUpdate = true
	    enableMovement()
	    enableRetry()
	end
end

