How to gather entities into sets?Using spreadplayers to tp them to armorstand in unloaded chunkDeleting entities at certain coordinates?Vertically stacked armor stands should have increasing scores, but don't“Merging” Entities?How to find entities not being riddenHow many entities in an area?How to detect proximity of two entities?How do i make giant entities?Teleporting entities (minecraft)(Java Minecraft 1.14.2) How to recursively (or otherwise) determine if a closed 2D arbitrarily sized rectangle of blocks has been placed?
Floating Pumice Road. Slab Size
Computer name naming convention for security
Why no parachutes in the Orion AA2 abort test?
What are the consequences for a developed nation to not accept any refugee?
What is the shape of the upper boundary of water hitting a screen?
First road bike, decade old quality or lower end and new?
I'm feeling like my character doesn't fit the campaign
How to gather entities into sets?
Why do airports remove/realign runways?
Tesco's Burger Relish Best Before End date number
What factors could lead to bishops establishing monastic armies?
How did the IEC decide to create kibibytes?
Did William Shakespeare hide things in his writings?
How was the website able to tell my credit card was wrong before it processed it?
Is it ok for parents to kiss and romance with each other while their 2- to 8-year-old child watches?
Why does the Misal rico de Cisneros uses the word "Qiſſa", and what is it supposed to mean? Why not "Miſſa" (Missa)?
What exactly is a "murder hobo"?
What does "spinning upon the shoals" mean?
Quotients of a ring of integers
Why is there paternal, for fatherly, fraternal, for brotherly, but no similar word for sons?
How do I talk to my wife about unrealistic expectations?
How do resistors generate different heat if we make the current fixed and changed the voltage and resistance? Notice the flow of charge is constant
Where are the Wazirs?
What do you call a situation where you have choices but no good choice?
How to gather entities into sets?
Using spreadplayers to tp them to armorstand in unloaded chunkDeleting entities at certain coordinates?Vertically stacked armor stands should have increasing scores, but don't“Merging” Entities?How to find entities not being riddenHow many entities in an area?How to detect proximity of two entities?How do i make giant entities?Teleporting entities (minecraft)(Java Minecraft 1.14.2) How to recursively (or otherwise) determine if a closed 2D arbitrarily sized rectangle of blocks has been placed?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Imagine that one day you decided to make an army of Mecha Combiner Robots in minecraft using commands. Each robot is made of 5 armor stands, CustomNamed mechahead, mechabody etc...
Then you spawn a few dozen of them in, just for testing purposes, and try to command one to raise their arm by teleporting an armor stand CustomNamed mecharightarm up a bit and... every single one of them raises their arm.
This is the kind of a problem that I ran into today, and a lot of times before when commands weren't as advanced as today, and just can't seem to be able to solve.
The logical solution is to break the entities up into separate sets, for instance by giving each armor stand an ID with scoreboard. But then, how does one select entities that have scores equal to another entity?
What are the solutions to running commands on sets of entities rather than just one?
minecraft minecraft-commands
New contributor
add a comment |
Imagine that one day you decided to make an army of Mecha Combiner Robots in minecraft using commands. Each robot is made of 5 armor stands, CustomNamed mechahead, mechabody etc...
Then you spawn a few dozen of them in, just for testing purposes, and try to command one to raise their arm by teleporting an armor stand CustomNamed mecharightarm up a bit and... every single one of them raises their arm.
This is the kind of a problem that I ran into today, and a lot of times before when commands weren't as advanced as today, and just can't seem to be able to solve.
The logical solution is to break the entities up into separate sets, for instance by giving each armor stand an ID with scoreboard. But then, how does one select entities that have scores equal to another entity?
What are the solutions to running commands on sets of entities rather than just one?
minecraft minecraft-commands
New contributor
Ehm that's six armor stands not five ehm
– Quijibo
5 hours ago
add a comment |
Imagine that one day you decided to make an army of Mecha Combiner Robots in minecraft using commands. Each robot is made of 5 armor stands, CustomNamed mechahead, mechabody etc...
Then you spawn a few dozen of them in, just for testing purposes, and try to command one to raise their arm by teleporting an armor stand CustomNamed mecharightarm up a bit and... every single one of them raises their arm.
This is the kind of a problem that I ran into today, and a lot of times before when commands weren't as advanced as today, and just can't seem to be able to solve.
The logical solution is to break the entities up into separate sets, for instance by giving each armor stand an ID with scoreboard. But then, how does one select entities that have scores equal to another entity?
What are the solutions to running commands on sets of entities rather than just one?
minecraft minecraft-commands
New contributor
Imagine that one day you decided to make an army of Mecha Combiner Robots in minecraft using commands. Each robot is made of 5 armor stands, CustomNamed mechahead, mechabody etc...
Then you spawn a few dozen of them in, just for testing purposes, and try to command one to raise their arm by teleporting an armor stand CustomNamed mecharightarm up a bit and... every single one of them raises their arm.
This is the kind of a problem that I ran into today, and a lot of times before when commands weren't as advanced as today, and just can't seem to be able to solve.
The logical solution is to break the entities up into separate sets, for instance by giving each armor stand an ID with scoreboard. But then, how does one select entities that have scores equal to another entity?
What are the solutions to running commands on sets of entities rather than just one?
minecraft minecraft-commands
minecraft minecraft-commands
New contributor
New contributor
edited 6 hours ago
pppery
4915 silver badges13 bronze badges
4915 silver badges13 bronze badges
New contributor
asked 8 hours ago
Anton PetrochenkoAnton Petrochenko
191 bronze badge
191 bronze badge
New contributor
New contributor
Ehm that's six armor stands not five ehm
– Quijibo
5 hours ago
add a comment |
Ehm that's six armor stands not five ehm
– Quijibo
5 hours ago
Ehm that's six armor stands not five ehm
– Quijibo
5 hours ago
Ehm that's six armor stands not five ehm
– Quijibo
5 hours ago
add a comment |
2 Answers
2
active
oldest
votes
I think that I understand your problem, and I think that this couod help you.
/execute as @e[tag=mechabody] at @s if score @s ID = #target ID as @e[tag=mecharightarm,sort=nearest,distance=..10] if score @s ID = #target ID run tp @s ~ ~ ~ ~ ~
With this command you are able to select a mecha via /scoreboard players set #target ID <targeted bot>
.
Then you are able to execute the first command, only change the tp
parameters, the coordinates are relative to the mecha's body.
Maybe you need to modify the distance
selector a bit for your needings, but I think, that the arm would never be further than ten blocks feom the body.
You can use this command also for the other components of the robot. Just make sure that all parts of the robot get the same ID.
And, but I think this is clear, you need to add a scoreboard objective
called ID
first, with has to be a dummy
scoreboard.
Hope that i hepled you.
Commander guy
What purpose do thesort
anddistance
parameters serve in this part? (as @e[tag=mecharightarm,sort=nearest,distance=..10]
)
– bearb001
4 hours ago
In 1.12 you needed to subtract the scores and check for 0, now it can luckily be done much easier.
– Fabian Röling
2 hours ago
add a comment |
This command will teleport any armor stand that is a right arm if the scoreboard objective ID
has the same value as any armor stand specified in the first part of the command.
/execute at <target selector for the body of every mech that should move the right arm>
as @e[type=minecraft:armor_stand,name=mecharightarm]
if score @s ID = @e[type=minecraft:armor_stand,name=mechabody,sort=nearest,limit=1] ID
run tp @s <Position relative to body>
This uses the body as a kind of root, you would target the mech by targeting the body armor stand. If two mechs have their body in the exact same position, then the command may get confused and move the arm of the wrong mech.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "41"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Anton Petrochenko is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f353962%2fhow-to-gather-entities-into-sets%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think that I understand your problem, and I think that this couod help you.
/execute as @e[tag=mechabody] at @s if score @s ID = #target ID as @e[tag=mecharightarm,sort=nearest,distance=..10] if score @s ID = #target ID run tp @s ~ ~ ~ ~ ~
With this command you are able to select a mecha via /scoreboard players set #target ID <targeted bot>
.
Then you are able to execute the first command, only change the tp
parameters, the coordinates are relative to the mecha's body.
Maybe you need to modify the distance
selector a bit for your needings, but I think, that the arm would never be further than ten blocks feom the body.
You can use this command also for the other components of the robot. Just make sure that all parts of the robot get the same ID.
And, but I think this is clear, you need to add a scoreboard objective
called ID
first, with has to be a dummy
scoreboard.
Hope that i hepled you.
Commander guy
What purpose do thesort
anddistance
parameters serve in this part? (as @e[tag=mecharightarm,sort=nearest,distance=..10]
)
– bearb001
4 hours ago
In 1.12 you needed to subtract the scores and check for 0, now it can luckily be done much easier.
– Fabian Röling
2 hours ago
add a comment |
I think that I understand your problem, and I think that this couod help you.
/execute as @e[tag=mechabody] at @s if score @s ID = #target ID as @e[tag=mecharightarm,sort=nearest,distance=..10] if score @s ID = #target ID run tp @s ~ ~ ~ ~ ~
With this command you are able to select a mecha via /scoreboard players set #target ID <targeted bot>
.
Then you are able to execute the first command, only change the tp
parameters, the coordinates are relative to the mecha's body.
Maybe you need to modify the distance
selector a bit for your needings, but I think, that the arm would never be further than ten blocks feom the body.
You can use this command also for the other components of the robot. Just make sure that all parts of the robot get the same ID.
And, but I think this is clear, you need to add a scoreboard objective
called ID
first, with has to be a dummy
scoreboard.
Hope that i hepled you.
Commander guy
What purpose do thesort
anddistance
parameters serve in this part? (as @e[tag=mecharightarm,sort=nearest,distance=..10]
)
– bearb001
4 hours ago
In 1.12 you needed to subtract the scores and check for 0, now it can luckily be done much easier.
– Fabian Röling
2 hours ago
add a comment |
I think that I understand your problem, and I think that this couod help you.
/execute as @e[tag=mechabody] at @s if score @s ID = #target ID as @e[tag=mecharightarm,sort=nearest,distance=..10] if score @s ID = #target ID run tp @s ~ ~ ~ ~ ~
With this command you are able to select a mecha via /scoreboard players set #target ID <targeted bot>
.
Then you are able to execute the first command, only change the tp
parameters, the coordinates are relative to the mecha's body.
Maybe you need to modify the distance
selector a bit for your needings, but I think, that the arm would never be further than ten blocks feom the body.
You can use this command also for the other components of the robot. Just make sure that all parts of the robot get the same ID.
And, but I think this is clear, you need to add a scoreboard objective
called ID
first, with has to be a dummy
scoreboard.
Hope that i hepled you.
Commander guy
I think that I understand your problem, and I think that this couod help you.
/execute as @e[tag=mechabody] at @s if score @s ID = #target ID as @e[tag=mecharightarm,sort=nearest,distance=..10] if score @s ID = #target ID run tp @s ~ ~ ~ ~ ~
With this command you are able to select a mecha via /scoreboard players set #target ID <targeted bot>
.
Then you are able to execute the first command, only change the tp
parameters, the coordinates are relative to the mecha's body.
Maybe you need to modify the distance
selector a bit for your needings, but I think, that the arm would never be further than ten blocks feom the body.
You can use this command also for the other components of the robot. Just make sure that all parts of the robot get the same ID.
And, but I think this is clear, you need to add a scoreboard objective
called ID
first, with has to be a dummy
scoreboard.
Hope that i hepled you.
Commander guy
edited 5 hours ago
Quijibo
2,5312 gold badges11 silver badges52 bronze badges
2,5312 gold badges11 silver badges52 bronze badges
answered 5 hours ago
commander guycommander guy
1685 bronze badges
1685 bronze badges
What purpose do thesort
anddistance
parameters serve in this part? (as @e[tag=mecharightarm,sort=nearest,distance=..10]
)
– bearb001
4 hours ago
In 1.12 you needed to subtract the scores and check for 0, now it can luckily be done much easier.
– Fabian Röling
2 hours ago
add a comment |
What purpose do thesort
anddistance
parameters serve in this part? (as @e[tag=mecharightarm,sort=nearest,distance=..10]
)
– bearb001
4 hours ago
In 1.12 you needed to subtract the scores and check for 0, now it can luckily be done much easier.
– Fabian Röling
2 hours ago
What purpose do the
sort
and distance
parameters serve in this part? (as @e[tag=mecharightarm,sort=nearest,distance=..10]
)– bearb001
4 hours ago
What purpose do the
sort
and distance
parameters serve in this part? (as @e[tag=mecharightarm,sort=nearest,distance=..10]
)– bearb001
4 hours ago
In 1.12 you needed to subtract the scores and check for 0, now it can luckily be done much easier.
– Fabian Röling
2 hours ago
In 1.12 you needed to subtract the scores and check for 0, now it can luckily be done much easier.
– Fabian Röling
2 hours ago
add a comment |
This command will teleport any armor stand that is a right arm if the scoreboard objective ID
has the same value as any armor stand specified in the first part of the command.
/execute at <target selector for the body of every mech that should move the right arm>
as @e[type=minecraft:armor_stand,name=mecharightarm]
if score @s ID = @e[type=minecraft:armor_stand,name=mechabody,sort=nearest,limit=1] ID
run tp @s <Position relative to body>
This uses the body as a kind of root, you would target the mech by targeting the body armor stand. If two mechs have their body in the exact same position, then the command may get confused and move the arm of the wrong mech.
add a comment |
This command will teleport any armor stand that is a right arm if the scoreboard objective ID
has the same value as any armor stand specified in the first part of the command.
/execute at <target selector for the body of every mech that should move the right arm>
as @e[type=minecraft:armor_stand,name=mecharightarm]
if score @s ID = @e[type=minecraft:armor_stand,name=mechabody,sort=nearest,limit=1] ID
run tp @s <Position relative to body>
This uses the body as a kind of root, you would target the mech by targeting the body armor stand. If two mechs have their body in the exact same position, then the command may get confused and move the arm of the wrong mech.
add a comment |
This command will teleport any armor stand that is a right arm if the scoreboard objective ID
has the same value as any armor stand specified in the first part of the command.
/execute at <target selector for the body of every mech that should move the right arm>
as @e[type=minecraft:armor_stand,name=mecharightarm]
if score @s ID = @e[type=minecraft:armor_stand,name=mechabody,sort=nearest,limit=1] ID
run tp @s <Position relative to body>
This uses the body as a kind of root, you would target the mech by targeting the body armor stand. If two mechs have their body in the exact same position, then the command may get confused and move the arm of the wrong mech.
This command will teleport any armor stand that is a right arm if the scoreboard objective ID
has the same value as any armor stand specified in the first part of the command.
/execute at <target selector for the body of every mech that should move the right arm>
as @e[type=minecraft:armor_stand,name=mecharightarm]
if score @s ID = @e[type=minecraft:armor_stand,name=mechabody,sort=nearest,limit=1] ID
run tp @s <Position relative to body>
This uses the body as a kind of root, you would target the mech by targeting the body armor stand. If two mechs have their body in the exact same position, then the command may get confused and move the arm of the wrong mech.
answered 7 hours ago
bearb001bearb001
2,9941 gold badge5 silver badges28 bronze badges
2,9941 gold badge5 silver badges28 bronze badges
add a comment |
add a comment |
Anton Petrochenko is a new contributor. Be nice, and check out our Code of Conduct.
Anton Petrochenko is a new contributor. Be nice, and check out our Code of Conduct.
Anton Petrochenko is a new contributor. Be nice, and check out our Code of Conduct.
Anton Petrochenko is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Arqade!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f353962%2fhow-to-gather-entities-into-sets%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Ehm that's six armor stands not five ehm
– Quijibo
5 hours ago