In my work I constantly run into functions of the following form. Let $X$ be a metric space and $\{x_n\}$ be a countable subset of $X$. For each $n$, we take two open sets ${U_n}$ and ${V_n}$, such that $V_n \subset \bar{V_n} \subset U_n$, where $\bar{V_n}$ is the closure of $V_n$. We assume that $\{U_n\}$ are disjoint. On the other hand, take for each $n$ a continuous function $f_n: X \rightarrow [0,1]$ such that $f_n (x_n) = 1$ and $f_n$ is identically zero outside $V_n$. The existence of $f_n$, of course, is ensured by complete regularity of metric space.
Now construct a function $$ f(x) = \sum_n f_n \mathbf{1}_{V_n} $$ that is, $f$ equals to $f_n$ on $V_n$ and vanishes outside the union of $\{V_n\}$. My question is: how do we conclude continuity of the function $f$?
It seems that the sum does not converge uniformly: for each $n$ we have $$ \sup_{x \in X} \sum_{m > n} f_m(x) \mathbf{1}_{V_m}(x) \geq f_{n+1}(x_{n+1})=1 $$ Working locally, i.e., at each point, appears messy to me, as there are cases where $x$ falls in some $V_n$, or falls on the boundary of some $V_n$, or falls outside the union of $\{V_n\}$ and so forth...
Can anyone point a way of concluding continuity of the function?