How to execute at the same height as an entity? (Minecraft)Minecraft 1.13 how to detect players at a certain Y coordinate?How to create an “Effect Aura” for players?Kill skeleton horses with command block in a radiusHow to delay a command blockTest for command blocksMinecraft - execute command testing logic (lightning Sword)Minecraft map help 1.12Generated Minecraft Command Blocks Don't ExecuteHow to teleport an arrow to another entitiy within a radius in Minecraft 1.13?Using execute command to teleport a player under a certain heightHow to execute a command when ALL of the players are close enough

How to publish superseding results without creating enemies

geschafft or geschaffen? which one is past participle of schaffen?

Are there any rules about taking damage whilst holding your breath in combat?

What is the name of this Allen-head furniture fastener?

In what sequence should an advanced civilization teach technology to medieval society to maximize rate of adoption?

Is there any way to land a rover on the Moon without using any thrusters?

Interaction between Teferi Time Raveler and Enduring Ideal

Make 1998 using the least possible digits 8

How does a simple logistic regression model achieve a 92% classification accuracy on MNIST?

How to be sure services and researches offered by the University are not becoming cases of unfair competition?

Can I fix my boots by gluing the soles back on?

What organs or modifications would be needed for a life biological creature not to require sleep?

Which is the current decimal separator?

Has SHA256 been broken by Treadwell Stanton DuPont?

Can a character with good/neutral alignment attune to a sentient object with evil alignment?

Would it be unbalanced to increase Wild Shape uses based on level?

The Planck constant for mathematicians

Why are some files not movable on Windows 10?

Is there a real-world mythological counterpart to WoW's "kill your gods for power" theme?

What exactly is a marshrutka (маршрутка)?

Is there a tool to measure the "maturity" of a code in Git?

Output a Super Mario Image

How To Make Earth's Oceans as Brackish as Lyr's

Cibus sanus — healthy food?



How to execute at the same height as an entity? (Minecraft)


Minecraft 1.13 how to detect players at a certain Y coordinate?How to create an “Effect Aura” for players?Kill skeleton horses with command block in a radiusHow to delay a command blockTest for command blocksMinecraft - execute command testing logic (lightning Sword)Minecraft map help 1.12Generated Minecraft Command Blocks Don't ExecuteHow to teleport an arrow to another entitiy within a radius in Minecraft 1.13?Using execute command to teleport a player under a certain heightHow to execute a command when ALL of the players are close enough






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















My problem is that I want to give every player on the same height as an area_effect_cloud within a radius of 25 blocks a scoreboard called 'stunned'.



The command for that would look something like this:



/execute @e[type=area_effect_cloud] ~ ~ ~ /scoreboard players set @a[y=~,r=25] stunned 1


But the only problem is that the y=~ is not a thing in Minecraft, does anyone have a solution to this, that isn't 1 or more command block for every height?



Thanks in advance.










share|improve this question


























  • This probably becomes easier in 1.13 with the new execute functionality, but it should be possible in 1.12.

    – MBraedley
    Dec 17 '17 at 17:36

















2















My problem is that I want to give every player on the same height as an area_effect_cloud within a radius of 25 blocks a scoreboard called 'stunned'.



The command for that would look something like this:



/execute @e[type=area_effect_cloud] ~ ~ ~ /scoreboard players set @a[y=~,r=25] stunned 1


But the only problem is that the y=~ is not a thing in Minecraft, does anyone have a solution to this, that isn't 1 or more command block for every height?



Thanks in advance.










share|improve this question


























  • This probably becomes easier in 1.13 with the new execute functionality, but it should be possible in 1.12.

    – MBraedley
    Dec 17 '17 at 17:36













2












2








2


0






My problem is that I want to give every player on the same height as an area_effect_cloud within a radius of 25 blocks a scoreboard called 'stunned'.



The command for that would look something like this:



/execute @e[type=area_effect_cloud] ~ ~ ~ /scoreboard players set @a[y=~,r=25] stunned 1


But the only problem is that the y=~ is not a thing in Minecraft, does anyone have a solution to this, that isn't 1 or more command block for every height?



Thanks in advance.










share|improve this question
















My problem is that I want to give every player on the same height as an area_effect_cloud within a radius of 25 blocks a scoreboard called 'stunned'.



The command for that would look something like this:



/execute @e[type=area_effect_cloud] ~ ~ ~ /scoreboard players set @a[y=~,r=25] stunned 1


But the only problem is that the y=~ is not a thing in Minecraft, does anyone have a solution to this, that isn't 1 or more command block for every height?



Thanks in advance.







minecraft minecraft-commands






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 17 '17 at 17:35









Skylinerw

11.9k1 gold badge16 silver badges33 bronze badges




11.9k1 gold badge16 silver badges33 bronze badges










asked Dec 17 '17 at 17:24









RyuNix99RyuNix99

112 bronze badges




112 bronze badges















  • This probably becomes easier in 1.13 with the new execute functionality, but it should be possible in 1.12.

    – MBraedley
    Dec 17 '17 at 17:36

















  • This probably becomes easier in 1.13 with the new execute functionality, but it should be possible in 1.12.

    – MBraedley
    Dec 17 '17 at 17:36
















This probably becomes easier in 1.13 with the new execute functionality, but it should be possible in 1.12.

– MBraedley
Dec 17 '17 at 17:36





This probably becomes easier in 1.13 with the new execute functionality, but it should be possible in 1.12.

– MBraedley
Dec 17 '17 at 17:36










1 Answer
1






active

oldest

votes


















3
















You almost had it, you just have to make a huge, flat box that takes the y coordinate of the entity, but ignores x and z. Like this:



/execute at @e[type=area_effect_cloud] run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


Notice that I use values for dx, dy and dz, but only offset x and z, not y, that way the game takes the y coordinate of the entity.



If you have a fixed y coordinate, you can also use this for a tiny bit of less lag:



/execute positioned <coordinates> run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


And if "stunned" is only ever 1 or 0, you can use tags (archive) instead.






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/4.0/"u003ecc by-sa 4.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
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f323165%2fhow-to-execute-at-the-same-height-as-an-entity-minecraft%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3
















    You almost had it, you just have to make a huge, flat box that takes the y coordinate of the entity, but ignores x and z. Like this:



    /execute at @e[type=area_effect_cloud] run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


    Notice that I use values for dx, dy and dz, but only offset x and z, not y, that way the game takes the y coordinate of the entity.



    If you have a fixed y coordinate, you can also use this for a tiny bit of less lag:



    /execute positioned <coordinates> run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


    And if "stunned" is only ever 1 or 0, you can use tags (archive) instead.






    share|improve this answer































      3
















      You almost had it, you just have to make a huge, flat box that takes the y coordinate of the entity, but ignores x and z. Like this:



      /execute at @e[type=area_effect_cloud] run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


      Notice that I use values for dx, dy and dz, but only offset x and z, not y, that way the game takes the y coordinate of the entity.



      If you have a fixed y coordinate, you can also use this for a tiny bit of less lag:



      /execute positioned <coordinates> run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


      And if "stunned" is only ever 1 or 0, you can use tags (archive) instead.






      share|improve this answer





























        3














        3










        3









        You almost had it, you just have to make a huge, flat box that takes the y coordinate of the entity, but ignores x and z. Like this:



        /execute at @e[type=area_effect_cloud] run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


        Notice that I use values for dx, dy and dz, but only offset x and z, not y, that way the game takes the y coordinate of the entity.



        If you have a fixed y coordinate, you can also use this for a tiny bit of less lag:



        /execute positioned <coordinates> run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


        And if "stunned" is only ever 1 or 0, you can use tags (archive) instead.






        share|improve this answer















        You almost had it, you just have to make a huge, flat box that takes the y coordinate of the entity, but ignores x and z. Like this:



        /execute at @e[type=area_effect_cloud] run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


        Notice that I use values for dx, dy and dz, but only offset x and z, not y, that way the game takes the y coordinate of the entity.



        If you have a fixed y coordinate, you can also use this for a tiny bit of less lag:



        /execute positioned <coordinates> run scoreboard players set @a[x=-30000000,z=-30000000,dx=60000000,dz=60000000,dy=1] stunned 1


        And if "stunned" is only ever 1 or 0, you can use tags (archive) instead.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 32 mins ago

























        answered Dec 17 '17 at 17:55









        Fabian RölingFabian Röling

        12.1k3 gold badges20 silver badges51 bronze badges




        12.1k3 gold badges20 silver badges51 bronze badges































            draft saved

            draft discarded















































            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%2f323165%2fhow-to-execute-at-the-same-height-as-an-entity-minecraft%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

            Sahara Skak | Bilen | Luke uk diar | NawigatsjuunCommonskategorii: SaharaWikivoyage raisfeerer: Sahara26° N, 13° O

            The fall designs the understood secretary. Looking glass Science Shock Discovery Hot Everybody Loves Raymond Smile 곳 서비스 성실하다 Defas Kaloolon Definition: To combine or impregnate with sulphur or any of its compounds as to sulphurize caoutchouc in vulcanizing Flame colored Reason Useful Thin Help 갖다 유명하다 낙엽 장례식 Country Iron Definition: A fencer a gladiator one who exhibits his skill in the use of the sword Definition: The American black throated bunting Spiza Americana Nostalgic Needy Method to my madness 시키다 평가되다 전부 소설가 우아하다 Argument Tin Feeling Representative Gym Music Gaur Chicken 일쑤 코치 편 학생증 The harbor values the sugar. Vasagle Yammoe Enstatite Definition: Capable of being limited Road Neighborly Five Refer Built Kangaroo 비비다 Degree Release Bargain Horse 하루 형님 유교 석 동부 괴롭히다 경제력

            19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу