	t_secure = {
		{flag = eg_flag_secure1, point = false, ui = false, uiID = OBJ_SecureRoad.PingID_Road1},
		{flag = eg_flag_secure2, point = false, ui = false, uiID = OBJ_SecureRoad.PingID_Road2},
		{flag = eg_flag_secure3, point = false, ui = false, uiID = OBJ_SecureRoad.PingID_Road3},
		{flag = eg_flag_secure4, point = false, ui = false, uiID = OBJ_SecureRoad.PingID_Road4},
		{flag = eg_flag_secure5, point = false, ui = false, uiID = OBJ_SecureRoad.PingID_Road5},
	}


-- mark the objective as complete once all road flags are captured
function SecureRoad_Check()
	
	for i = 1, 5 do
		t_secure[i].point = Player_OwnsEGroup(player1, t_secure[i].flag)
	end
	
	-- count up how many of the road flags the player owns
	-- also turn UI flags on and off
	local count = 0
	for i = 1, 5 do 
		if t_secure[i].point == true then
			count = count + 1 
			if t_secure[i].ui == true then
				t_secure[i].ui = false
				Objective_RemoveUIElements(OBJ_SecureRoad, t_secure[i].uiID)
			end
		elseif t_secure[i].point == false and t_secure[i].ui == false then
			t_secure[i].ui = true
			t_secure[i].uiID = Objective_AddUIElements(OBJ_SecureRoad, t_secure[i].flag, true, false, false, true, true)
		end
	end
	
	if count == 5 then
		Objective_Complete(OBJ_SecureRoad)
		Rule_RemoveMe()
	end

end

