Mission = {
};


function Mission:OnInit()
	r_Cryvision = 1; --init noise effect
	i_mouse_smooth = 6; --init smooth mouse sense
	e_obj_view_dist_ratio = 100;
end

function Mission:Finish()
	-- go to next mission...
end

------------------
--//general
------------------
function Mission:Event_AddMessage()
	Hud:AddMessage("OLOLO");
end

function Mission:Event_AddCenterMessage()
	Hud:AddCenterMessage("OLOLO");
end

function Mission:Event_AddSubtitle()
	Hud:AddSubtitle("OLOLO");
end

function Mission:Event_SetHudWidescreen()
	hud_panoramic = 1;
end

function Mission:Event_SetFOVWidescreen()
	Game:SetCameraFov(90);
end	

function Mission:Event_Blur_Default()
	r_MotionBlur = 1;
	r_MotionBlurAmount = 0.9;
	r_MotionBlurDisplace = 4.0;
end

function Mission:Event_Blur_Scary()
	r_MotionBlur = 1;
	r_MotionBlurAmount = 0.05;
end

function Mission:Event_ScreenBlur_Default()
	r_ScreenBlurAmount = 0.15;
end

function Mission:Event_ScreenBlur_Scary()
	r_ScreenBlurAmount = 0.4;
end

function Mission:Event_FadeOut_0s()
	System:SetScreenFx("ScreenFade" , 1);                            	
	System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime",0.1);
end

function Mission:Event_FadeIn_0s()
	System:SetScreenFx("ScreenFade" , 1);                            	
	System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime",-0.1);
end

function Mission:Event_FadeOut_1s()
	System:SetScreenFx("ScreenFade" , 1);                            	
	System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime",1);
end

function Mission:Event_FadeIn_1s()
	System:SetScreenFx("ScreenFade" , 1);                            	
	System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime",-1);
end

function Mission:Event_FadeOut_2s()
	System:SetScreenFx("ScreenFade" , 1);                            	
	System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime",2);
end

function Mission:Event_FadeIn_2s()
	System:SetScreenFx("ScreenFade" , 1);                            	
	System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime",-2);
end

function Mission:Event_FadeOut_4s()
	System:SetScreenFx("ScreenFade" , 1);                            	
	System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime",4);
end

function Mission:Event_FadeIn_4s()
	System:SetScreenFx("ScreenFade" , 1);                            	
	System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime",-4);
end

function Mission:Event_FadeOut_10s()
	System:SetScreenFx("ScreenFade" , 1);                            	
	System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime",10);
end

function Mission:Event_ShakeCamera()

end

function Mission:Event_FinishGame()
--	disconnect
	Game:Disconnect();
end
------------------
--//teleporting general
------------------
function Mission:Teleport(cameraname)
	local camera=System:GetEntityByName(cameraname);
	if((camera)and(_localplayer))then
		local camerapos=camera:GetPos();
		camerapos.z=camerapos.z;
		_localplayer:SetPos(camerapos);
		_localplayer:SetAngles(camera:GetAngles());
	end
end
------------------
--//teleportings
------------------
function Mission:Event_teleport0()
	Mission:Teleport("teleport0"); --camera name
end

function Mission:Event_teleport1()
	Mission:Teleport("teleport1"); --camera name
end

function Mission:Event_teleport2()
	Mission:Teleport("teleport2"); --camera name
end

function Mission:Event_teleport3()
	Mission:Teleport("teleport3"); --camera name
end

function Mission:Event_teleport4()
	Mission:Teleport("teleport4"); --camera name
end

function Mission:Event_teleport5()
	Mission:Teleport("teleport5"); --camera name
end

function Mission:Event_teleport6()
	Mission:Teleport("teleport6"); --camera name
end

function Mission:Event_teleport7()
	Mission:Teleport("teleport7"); --camera name
end

function Mission:Event_teleport8()
	Mission:Teleport("teleport8"); --camera name
end

function Mission:Event_teleport9()
	Mission:Teleport("teleport9"); --camera name
end

function Mission:Event_teleport10()
	Mission:Teleport("teleport10"); --camera name
end

function Mission:Event_teleport11()
	Mission:Teleport("teleport11"); --camera name
end

function Mission:Event_teleport12()
	Mission:Teleport("teleport12"); --camera name
end

function Mission:Event_teleport13()
	Mission:Teleport("teleport13"); --camera name
end

function Mission:Event_teleport14()
	Mission:Teleport("teleport14"); --camera name
end

function Mission:Event_teleport15()
	Mission:Teleport("teleport15"); --camera name
end

function Mission:Event_teleport16()
	Mission:Teleport("teleport16"); --camera name
end

function Mission:Event_teleport17()
	Mission:Teleport("teleport17"); --camera name
end

function Mission:Event_teleport18()
	Mission:Teleport("teleport18"); --camera name
end
------------------
--//cutscenes
------------------
function Mission:Event_Play_cutscene()
	Movie:PlaySequence('cutscene');
end

function Mission:Event_Play_start_lighting()
	Movie:PlaySequence('start_lighting');
end

function Mission:Event_Play_credits()
	Movie:PlaySequence('credits');
end