Mission = {
};


function Mission:OnInit()
	-- you may want to load a string-table etc. here...
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:Event_firstmessage()
	Hud:AddMessage("Things are going to get tough from now on.....",1000);
end

function Mission:Event_firstmessageb()
	Hud:AddMessage("`Got to distract them by taking out a few smaller targets",1000);
end

function Mission:Event_firstmessagec()
	Hud:AddMessage("There`s a satellite dish on top of a hill...",1000);
	Hud:PushObjective({},"Destroy Dish!");
	Hud:SetRadarObjective("dish");
end

function Mission:Event_welldone()
	Hud:AddMessage("Well Done",1000);
end


function Mission:Event_secondmessage()
	Hud:CompleteObjective("Destroy Dish!");
	Hud:AddMessage("There`s a refinery around here somewhere",1000);
end


function Mission:Event_secondmessageb()
	Hud:AddMessage("That'll make a nice bang!",1000);
	Hud:PushObjective({},"Blow up refinery!");
	Hud:SetRadarObjective("refinery");
end

function Mission:Event_killtecs()
	Hud:CompleteObjective("Blow up refinery!");
	Hud:AddMessage("That was too easy",1000);
end

function Mission:Event_killtecs2()
	Hud:AddMessage("You may as well kill the technicians",1000);
	Hud:AddMessage("in the research building too",1000);
	Hud:SetRadarObjective("tecs");
	Hud:PushObjective({},"Kill the technicians");
end

function Mission:Event_thirdmessage()
	Hud:CompleteObjective("Blow up refinery!");
	Hud:CompleteObjective("Kill the technicians");
	Hud:AddMessage("Now to business",1000);
end

function Mission:Event_thirdmessageb()
	Hud:AddMessage("The traitor is somewhere in that complex",1000);
	Hud:PushObjective({},"Kill traitor!");
	Hud:SetRadarObjective("traitor");
end

function Mission:Event_thirdmessagec()
	Hud:AddMessage("but it`s protected by security doors,blast doors",1000);
	Hud:AddMessage("force fields,mines....!",1000);
end

function Mission:Event_thirdmessaged()
	Hud:AddMessage("There may be a way to disable some of it..",1000);
end

function Mission:Event_forcefield()
	Hud:AddMessage("This force field is maintained from a remote location",1000);
end

function Mission:Event_door()
	Hud:AddMessage("This door has been deactivated from a remote location",1000);
end

function Mission:Event_moreexplosives()
	Hud:AddMessage("You`re going to need some more explosives",1000);
	Hud:PushObjective({},"Find more explosives");
end

function Mission:Event_gotexplosives()
	Hud:CompleteObjective("Find more explosives");
end

function Mission:Event_stealth()
	Hud:AddMessage("WHOAH! Some kind of stealth technology?",1000);
end

function Mission:Event_deadagain()
	Hud:AddMessage("GOT HIM!..Hmmm looks familiar...",1000);
	Hud:CompleteObjective("Kill traitor!");
end

function Mission:Event_getout()
	Hud:SetRadarObjective("nil");
	Hud:AddMessage("Now to get out of here",1000);
end

function Mission:Event_getout2()
	Hud:AddMessage("A paraglider is hidden around here somewhere",1000);
	Hud:PushObjective({},"Find paraglider");
end

function Mission:Event_done()
	Hud:CompleteObjective("Find paraglider");
	Hud:AddMessage("CONGRATULATIONS : MISSION COMPLETE",10000);
	Hud:PushObjective({},"+++++ MISSION COMPLETE +++++");
end

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