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;








3















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...A lot of em, yes



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?










share|improve this question









New contributor



Anton Petrochenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Ehm that's six armor stands not five ehm

    – Quijibo
    5 hours ago


















3















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...A lot of em, yes



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?










share|improve this question









New contributor



Anton Petrochenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Ehm that's six armor stands not five ehm

    – Quijibo
    5 hours ago














3












3








3








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...A lot of em, yes



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?










share|improve this question









New contributor



Anton Petrochenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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...A lot of em, yes



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






share|improve this question









New contributor



Anton Petrochenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Anton Petrochenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 6 hours ago









pppery

4915 silver badges13 bronze badges




4915 silver badges13 bronze badges






New contributor



Anton Petrochenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 8 hours ago









Anton PetrochenkoAnton Petrochenko

191 bronze badge




191 bronze badge




New contributor



Anton Petrochenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Anton Petrochenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 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






Ehm that's six armor stands not five ehm

– Quijibo
5 hours ago











2 Answers
2






active

oldest

votes


















2














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






share|improve this answer

























  • 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


















1














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.






share|improve this answer

























    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.









    draft saved

    draft discarded


















    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









    2














    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






    share|improve this answer

























    • 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















    2














    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






    share|improve this answer

























    • 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













    2












    2








    2







    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






    share|improve this answer















    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







    share|improve this answer














    share|improve this answer



    share|improve this answer








    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 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

















    • 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
















    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













    1














    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.






    share|improve this answer



























      1














      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.






      share|improve this answer

























        1












        1








        1







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 7 hours ago









        bearb001bearb001

        2,9941 gold badge5 silver badges28 bronze badges




        2,9941 gold badge5 silver badges28 bronze badges




















            Anton Petrochenko is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

            Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

            Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її