Simply assign the first entity's score to a dummy score then subtract the second score from the dummy. Use /execute @e[score_dummy=0,score_dummy_min=0] to determine if they are equal.
Not sure if execute is necessary, but I like to use it to ensure that each player is subtracting a score from themself and not a different player.
What happens here, we assign every player the score of the armor stand, then we subtract each players Cell score from the players newly set score of the armor stand. Now to see who matches use
/execute @a[score_equal=0,score_equal_min=0] ~ ~ ~ say I match!
Not sure if execute is necessary, but I like to use it to ensure that each player is subtracting a score from themself and not a different player.
What happens here, we assign every player the score of the armor stand, then we subtract each players Cell score from the players newly set score of the armor stand. Now to see who matches use
/execute @a[score_equal=0,score_equal_min=0] ~ ~ ~ say I match!
Good, good, good! What I needed I think! Except, what happens if I have multiple armor stands with different ID scores?
Just change @e[type=ArmorStand] accordingly. I assume they all have different names?
Edit: You could also create different scoreboard objectives for each armor stand comparison and set this same operation up for each one. Like use this same concept but change "equal" to "equal1", "equal2", etc for all of the different armor stands.
Just change @e[type=ArmorStand] accordingly. I assume they all have different names?
Edit: You could also create different scoreboard objectives for each armor stand comparison and set this same operation up for each one. Like use this same concept but change "equal" to "equal1", "equal2", etc for all of the different armor stands.
No, they don't. All armor stands are identical except for their ID scores. This distinguishes them so the players with the matching scores can be teleported to the right cells.
Ahhh okay I see what you're trying to do now. I think an easier route here would be to name each of them by their ID number instead of using a scoreboard for it. Then you could simply use this:
Ahhh okay I see what you're trying to do now. I think an easier route here would be to name each of them by their ID number instead of using a scoreboard for it. Then you could simply use this:
And if naming is not an option? Is this still possible? Because essentially, I want my system to be expandable so that there can be as many armor stands as needed by whoever downloads my schematic.
Just connect this to a fill clock. All objectives used here are of type dummy.
How this works is first we will get the total number of possible armor stands, then we subtract that number from every players Cell score, then we subtract that same number from every armor stands ID score in temporary objectives. Now only one armor stand will have the new score set to 0 and only the players that have the Cell of that one armor stand will have their score also set to 0. We then select those players and teleport them to the armor stand. After that we remove 1 from the total armor stand count so that when the circuit starts over, this time it is looking for a different Cell and ID. This will go all the way till it hits 0. You should have a command block at the end that has something like this to deactivate the circuit:
/execute @p[score_IDCount=0] (coords of the command block circuit) fill ~ ~ ~ ~5 ~ ~ minecraft:redstone_block
And set the coords to the xyz just next to the line of these command blocks so that this will put redstone blocks on the other side of the fill clock, not allowing the fill clock to power them. In the first part of the circuit that only triggers once, you should use a similar /fill command removing these redstone blocks.
www.youtube.com/user/dinodude162
What happens here, we assign every player the score of the armor stand, then we subtract each players Cell score from the players newly set score of the armor stand. Now to see who matches use
Good, good, good! What I needed I think! Except, what happens if I have multiple armor stands with different ID scores?
www.youtube.com/user/dinodude162
Edit: You could also create different scoreboard objectives for each armor stand comparison and set this same operation up for each one. Like use this same concept but change "equal" to "equal1", "equal2", etc for all of the different armor stands.
No, they don't. All armor stands are identical except for their ID scores. This distinguishes them so the players with the matching scores can be teleported to the right cells.
www.youtube.com/user/dinodude162
Edit: Actually, you don't really need to name them or do anything, you could just use this:
And if naming is not an option? Is this still possible? Because essentially, I want my system to be expandable so that there can be as many armor stands as needed by whoever downloads my schematic.
www.youtube.com/user/dinodude162
How this works is first we will get the total number of possible armor stands, then we subtract that number from every players Cell score, then we subtract that same number from every armor stands ID score in temporary objectives. Now only one armor stand will have the new score set to 0 and only the players that have the Cell of that one armor stand will have their score also set to 0. We then select those players and teleport them to the armor stand. After that we remove 1 from the total armor stand count so that when the circuit starts over, this time it is looking for a different Cell and ID. This will go all the way till it hits 0. You should have a command block at the end that has something like this to deactivate the circuit: And set the coords to the xyz just next to the line of these command blocks so that this will put redstone blocks on the other side of the fill clock, not allowing the fill clock to power them. In the first part of the circuit that only triggers once, you should use a similar /fill command removing these redstone blocks.