Mission = {
};


function Mission:OnInit()
	-- you may want to load a string-table etc. here...
System:SetConsoleImage("loadscreen_atoll", 0)
end

function Mission:OnUpdate()
	local i;
	local bFinished=1;
	for i,objective in Mission do
		if (type(objective)~="function") then
			if (objective==0) then 
				bFinished=0;				
			else
			end
		end	
	end
	if (bFinished==1) then	
		self.Finish();
	end
end


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


function Mission:Event_start()
Hud:AddMessage("New objective",15)
Hud:PushObjective({},"Destroy the secret laboratory")
end

function Mission:Event_card()
Hud:AddMessage("New objective",15)
Hud:PushObjective({},"Take the green keycard")
Hud:SetRadarObjective("radar1")
end

function Mission:Event_explosive()
Hud:CompleteObjective("Take the green keycard")
Hud:AddMessage("New objective",15)
Hud:PushObjective({},"Take the explosive")
Hud:SetRadarObjective("radar2")
end

function Mission:Event_laboratory()
Hud:CompleteObjective("Take the explosive")
Hud:AddMessage("New objective",15)
Hud:SetRadarObjective("radar3")
end

function Mission:Event_helicopter()
Hud:AddMessage("Complete objective")
Hud:AddMessage("New objective",15)
Hud:PushObjective({},"Go to the helicopter")
Hud:CompleteObjective("Destroy the secret laboratory")
Hud:SetRadarObjective("radar4")
end

function Mission:Event_missionfinished()
Game:SendMessage('StartLevelFade Fort');
end

function Mission:Event_screenfadeout()
System:SetScreenFx("ScreenFade" , 1);                            	
--System:SetScreenFxParamFloat("ScreenFade", "ScreenPreFadeTime", 10);
System:SetScreenFxParamFloat("ScreenFade", "ScreenFadeTime", 3);
end