Assuming that there is only one entity with that same score for that objective
What I'm trying to do is, if certain conditions are met for one entity, it will execute a command at another entity with the same score for that objective (one way). Is that even possible?
Best Answer
I'm a bit late, but I know a solution for your problem, so I thought I'd post it anyway. This is a method that I have used before to execute a command at entities with a similar score. This method works for minecraft 1.12
Let's pretend there are two different types of entities: armorstands and zombies. Each armorstand has a unique score and so have the zombies.
Let's also say there are two scoreboards:
standScore
andzombieScore
.For this method I need one extra scoreboard. I'll call it
math
.Execute some command at armorstands with the same score as a certain zombie:
You can also do this the other way around, but you better use an extra math objective to store all the zombie entities, just to be sure.
This method has one drawback, which is that all the entities have to be inside render distance, because otherwise they don't get targeted by the target selectors.
I hope this helps