local result
local vector2 = require("#microsoft.xna.framework.vector2")
local coroutineEntity = monocle.Entity()

function onTalk()
	makeUnskippable()
    disableRetry()
    disableMovement()
    player.ForceCameraUpdate = true
	engine.Scene:add(coroutineEntity)
	coroutineEntity:add(monocle.Coroutine(getLevel():ZoomTo(vector2(140, 110), 1.75, 1.25)))
    walkTo(4824, false, 1.0, false)
    local luanet = _G.luanet    
    player.Facing = luanet.enum(luanet.import_type("Celeste.Facings"), "Right")
	celeste.Audio.SetMusicParam("dialog", 1.0)
	say("bhotel_enter_chute_start")
	
repeat
	if true then
		result = choice("bhotel_enter_chute_yes_ASK", "bhotel_enter_chute_no_ASK")
		if result == 1 then
			setFlag("bhotel_enter_chute")
			result = 2
		else
			result = 2
		end

	else
		--IF I REMOVE THIS PART THE CUTSCENE DOESNT WORK AND I DONT UNDERSTAND WHY
		if false then
			result = choice("bhotel_enter_chute_yes_ASK", "bhotel_enter_chute_no_ASK")
			if result == 1 then
				say("bhotel_enter_chute")
				result = 2
				result = 2
			else
				result = 2
			end
	end
end
until result == 2
	coroutine.yield(getLevel():ZoomBack(0.5))
end

function onEnd()
	getLevel():remove(coroutineEntity)
    player.ForceCameraUpdate = false
	celeste.Audio.SetMusicParam("dialog", 0.0)
    enableMovement()
end