Finding particular objects by tag AND variable

Hello,
I’m not sure if this is possible or a good idea, essentially what I have is a worker that moves from a base to a resource node and collecting resources. This is going to be a persistent world for only a few people but there can be several bases. What it currently does is search for the closest base by iterating though all of them and remembering the closest one. The problem here is that I have already used the tag so the same script can be used to search for the node and the base. Because there will be other people in the game is there a way I can make it look only for bases belonging to the player, and not an opponent. This is also a problem because at the start the worker checks for the primary base entity and saves that so it can access variables like how much money the player has, but if there are two players it may get the wrong base. Can I only use the tag or can I check a variable without it dragging down the efficiancy of the software.

Kind regards,
-Scobbo

You can still use GetComponent after you found something by tag if thats what you up for.