dofile("scripts/entities/entityinclude.lua")

function init()
	toggleDamageSprite(false)
	fade2(0, 1, 1, 1, 1)
	--return
	
	setOverrideVoiceFader(0.6)
	
	entity_setPosition(getNaija(), 0, 0)

	
	camDummy = createEntity("Empty")
	cam1 = getNode("CAM1")
	cam2 = getNode("CAM2")
	cam3 = getNode("CAM3")
	
	campan1 = getNode("CAMPAN1")
	campan2 = getNode("CAMPAN2")
	campan3 = getNode("CAMPAN3")
	
	camdestroy1 = getNode("CAMDESTROY1")
	camdestroy2 = getNode("CAMDESTROY2")
	
		
	-- 1

	overrideZoom(1)
	entity_warpToNode(camDummy, cam1)
	cam_toEntity(camDummy)
	
	watch(0.5)

	fade2(0, 0, 1, 1, 1)
	fadeIn(1)
	watch(1)
	
	n = getNaija()
	entity_setPosition(n, 0, 0)
	playMusicOnce("DruniadDance")
	
	
	entity_setPosition(camDummy, node_x(cam2), node_y(cam2), 10, 0, 0, 1)

	overrideZoom(0.8, 10.1)
	
	watch(4)
	
	while entity_isInterpolating(camDummy) do
		watch(FRAME_TIME)
	end
	
	entity_setPosition(camDummy, node_x(cam3), node_y(cam3), 5, 0, 0, 1)

	overrideZoom(0.5, 11)
	
	while entity_isInterpolating(camDummy) do
		watch(FRAME_TIME)
	end
	
	fade2(1, 1, 1, 1, 1)
	watch(1)
	
	--2 
	overrideZoom(1)
	entity_warpToNode(camDummy, campan1)
	cam_toEntity(camDummy)
	
	watch(0.5)
	
	entity_setPosition(camDummy, node_x(campan2), node_y(campan2), 16, 0, 0, 1)
	
	overrideZoom(0.5, 21)

	fade2(0, 1, 1, 1, 1)
	watch(1)
	
	watch(7)
	
	voice("Naija_Vision_Forest")
	watch(8)
	
	
	entity_setPosition(camDummy, node_x(campan3), node_y(campan3), 11, 0, 0, 1)
	
	watch(10)
		
	fade2(1, 1)
	watch(1)
	
	
	--3
	overrideZoom(1)
	entity_warpToNode(camDummy, camdestroy1)
	cam_toEntity(camDummy)
	
	watch(0.5)
	
	entity_setPosition(camDummy, node_x(camdestroy2), node_y(camdestroy2), 10, 0, 0, 0)
	
	overrideZoom(0.5, 8)
	
	fade2(0, 1)
	watch(1)

	shakeCamera(20, 10)
	
	for i = 1,(8/FRAME_TIME) do
		x,y = getScreenCenter()
		node = getNode("DESTROY")
		ent = getFirstEntity()
		while ent ~= 0 do
			if not entity_isState(ent, STATE_DONE) and node_isEntityIn(node, ent) and entity_x(ent) < x+200 then
				entity_setState(ent, STATE_DONE)
			end
			ent = getNextEntity()
		end
		watch(FRAME_TIME)
	end

	fade2(1, 4)
	watch(4)
	
	
	
	fade2(0, 0.1)
	
	showImage("Visions/Forest/00")
	--[[
	voice("")
	watchForVoice()
	]]--
	watch(10)
	hideImage()
	overrideZoom(1, 7)
	watch(4)
	changeForm(FORM_NATURE)
	watch(3)

	setOverrideVoiceFader(-1)
	
	voice("Naija_Song_NatureForm")
	loadMap("Tree02", "NAIJADONE")

	--[[
	fade2(0, 0.5, 1, 1, 1)
	
	cam_toEntity(n)
	]]--

end


