

function onBegin()
	makeUnskippable()
	math.randomseed(os.time())
	local height1 = 0
	local height2 = 0
	local heightDelta = 0
	local heightMax = 0

	local tauntRoll = 1
	local tauntNormalIndex = 0
	local tauntGreatIndex = 0


	while true do
		waitUntilOnGround()
		height1 = (-player.Y + 8904)/8
		if heightDelta > -1 then
			if height1 - heightMax < -50 then

				tauntRoll = math.random(1,6)

				if height1 - heightMax > -300 then
					--picks between laughter and motivational messages
					if tauntRoll > 4 then
						--ensure range of index mathes range of possible taunts
						tauntNormalIndex = math.random(1,34)

						miniTextbox("Downside2_TauntNormal"..tauntNormalIndex)
					else
						playSound("event:/char/granny/laugh_firstphrase")
					end
				end
				if height1 - heightMax < -299 then

					if tauntRoll > 1 then
						--ensure range of index mathes range of possible taunts

						tauntGreatIndex = math.random(1,9)
						miniTextbox("Downside2_TauntGreat"..tauntGreatIndex)
					else

						playSound("event:/char/dialogue/secret_character")
					end
				end
				--print("Fell from Y ", heightMax,"to Y ", height1)
				--print("Total fall delta:	", height1 - heightMax, string.char(10))
				-- set wait time to perhaps 3 minutes or more?
				wait(180)
			end
			heightMax = height1
		end

		wait(2)

		waitUntilOnGround()
		
		height2 = (-player.Y + 8904)/8
		heightDelta = height2 - height1

		--print("Height one:	", height1)
		--print("Height two:	", height2)
		--print("Height max:	", heightMax)
		--print("Height delta:	", heightDelta, string.char(10))


	end
end