So this is a somewhat general question I have regarding selection of two specific entities from one command.
Let’s say I have two entities (a player and an armor stand) with a score for an objective called “Test” equal to x (x is an arbitrary integer ranging from 1-1000. No two player has the same score for “Test”). Now, let’s say I wanted to teleport a specific armor stand with a score of x to a specific player with a score of x.
My questions is- How would I be able to have a command such that it teleports the specific armor stand with “Test”=x to a player with “Test”=x (so that I don’t have a thousand commands with: ‘/tp @e[type=armor_stand,scores={Test=1}] @a[scores={Test=1}]’...).
Thank you- but does this command work in multiplayer. Like if there are two players (one with a score of x and the other with a score of y) and two armor stands (one with a score of x and the other with a score of y), if I decide to run the commands for both player-armor stand pairs at the same time, will armor stand x/player x be teleported together, and armor stand y/player y be teleported together?
Yes, with that, it will take all player one by one, and if one player score X = one armor stand score X, it will tp the armor_stand to the player and then continue to check other players.
So this is a somewhat general question I have regarding selection of two specific entities from one command.
Let’s say I have two entities (a player and an armor stand) with a score for an objective called “Test” equal to x (x is an arbitrary integer ranging from 1-1000. No two player has the same score for “Test”). Now, let’s say I wanted to teleport a specific armor stand with a score of x to a specific player with a score of x.
My questions is- How would I be able to have a command such that it teleports the specific armor stand with “Test”=x to a player with “Test”=x (so that I don’t have a thousand commands with: ‘/tp @e[type=armor_stand,scores={Test=1}] @a[scores={Test=1}]’...).
Thank you in advance!
The Big Dog
You can't do that with only one command sadly...
If you use function, you can do this :
and in function a :
I like trains... OF CHAIN COMMAND BLOCKS !
Thank you- but does this command work in multiplayer. Like if there are two players (one with a score of x and the other with a score of y) and two armor stands (one with a score of x and the other with a score of y), if I decide to run the commands for both player-armor stand pairs at the same time, will armor stand x/player x be teleported together, and armor stand y/player y be teleported together?
The Big Dog
Yes, with that, it will take all player one by one, and if one player score X = one armor stand score X, it will tp the armor_stand to the player and then continue to check other players.
I like trains... OF CHAIN COMMAND BLOCKS !