How do I test when a player moves forward?












1














I'm working on a one command creation called Magical Weapons. There's a weapon called the Reverse Crystal, and it basically reverses the movement. If you move +1 on the x-axis, you are teleported -2 on the x-axis, and so on and so forth. But how do I test for when a player moves, like +1 X or -1 Z?










share|improve this question
















bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 3




    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
    – Frank
    Jun 22 '16 at 1:09






  • 1




    @Frank I didn't really try because I had no idea where to start... sorry!
    – rappatic
    Jun 22 '16 at 1:43






  • 2




    @RudolfL.Jelínek You are completely missing the point here. This is definitely not easy to do, which makes "Write my commands for me" questions plain rude without putting in effort first. Furthermore, due to the nature of Arqade/SE, we require a full answer, which makes brainstorming (which would actually help the asker) impossible.
    – MrLemon
    Jun 22 '16 at 9:24










  • @MrLemon oh, ok
    – user3.14159265359
    Jun 22 '16 at 9:26
















1














I'm working on a one command creation called Magical Weapons. There's a weapon called the Reverse Crystal, and it basically reverses the movement. If you move +1 on the x-axis, you are teleported -2 on the x-axis, and so on and so forth. But how do I test for when a player moves, like +1 X or -1 Z?










share|improve this question
















bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 3




    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
    – Frank
    Jun 22 '16 at 1:09






  • 1




    @Frank I didn't really try because I had no idea where to start... sorry!
    – rappatic
    Jun 22 '16 at 1:43






  • 2




    @RudolfL.Jelínek You are completely missing the point here. This is definitely not easy to do, which makes "Write my commands for me" questions plain rude without putting in effort first. Furthermore, due to the nature of Arqade/SE, we require a full answer, which makes brainstorming (which would actually help the asker) impossible.
    – MrLemon
    Jun 22 '16 at 9:24










  • @MrLemon oh, ok
    – user3.14159265359
    Jun 22 '16 at 9:26














1












1








1







I'm working on a one command creation called Magical Weapons. There's a weapon called the Reverse Crystal, and it basically reverses the movement. If you move +1 on the x-axis, you are teleported -2 on the x-axis, and so on and so forth. But how do I test for when a player moves, like +1 X or -1 Z?










share|improve this question















I'm working on a one command creation called Magical Weapons. There's a weapon called the Reverse Crystal, and it basically reverses the movement. If you move +1 on the x-axis, you are teleported -2 on the x-axis, and so on and so forth. But how do I test for when a player moves, like +1 X or -1 Z?







minecraft minecraft-commands






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 22 '16 at 1:06









Frank

19.6k2087136




19.6k2087136










asked Jun 22 '16 at 1:00









rappatic

7871623




7871623





bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 3




    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
    – Frank
    Jun 22 '16 at 1:09






  • 1




    @Frank I didn't really try because I had no idea where to start... sorry!
    – rappatic
    Jun 22 '16 at 1:43






  • 2




    @RudolfL.Jelínek You are completely missing the point here. This is definitely not easy to do, which makes "Write my commands for me" questions plain rude without putting in effort first. Furthermore, due to the nature of Arqade/SE, we require a full answer, which makes brainstorming (which would actually help the asker) impossible.
    – MrLemon
    Jun 22 '16 at 9:24










  • @MrLemon oh, ok
    – user3.14159265359
    Jun 22 '16 at 9:26














  • 3




    Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
    – Frank
    Jun 22 '16 at 1:09






  • 1




    @Frank I didn't really try because I had no idea where to start... sorry!
    – rappatic
    Jun 22 '16 at 1:43






  • 2




    @RudolfL.Jelínek You are completely missing the point here. This is definitely not easy to do, which makes "Write my commands for me" questions plain rude without putting in effort first. Furthermore, due to the nature of Arqade/SE, we require a full answer, which makes brainstorming (which would actually help the asker) impossible.
    – MrLemon
    Jun 22 '16 at 9:24










  • @MrLemon oh, ok
    – user3.14159265359
    Jun 22 '16 at 9:26








3




3




Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
– Frank
Jun 22 '16 at 1:09




Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
– Frank
Jun 22 '16 at 1:09




1




1




@Frank I didn't really try because I had no idea where to start... sorry!
– rappatic
Jun 22 '16 at 1:43




@Frank I didn't really try because I had no idea where to start... sorry!
– rappatic
Jun 22 '16 at 1:43




2




2




@RudolfL.Jelínek You are completely missing the point here. This is definitely not easy to do, which makes "Write my commands for me" questions plain rude without putting in effort first. Furthermore, due to the nature of Arqade/SE, we require a full answer, which makes brainstorming (which would actually help the asker) impossible.
– MrLemon
Jun 22 '16 at 9:24




@RudolfL.Jelínek You are completely missing the point here. This is definitely not easy to do, which makes "Write my commands for me" questions plain rude without putting in effort first. Furthermore, due to the nature of Arqade/SE, we require a full answer, which makes brainstorming (which would actually help the asker) impossible.
– MrLemon
Jun 22 '16 at 9:24












@MrLemon oh, ok
– user3.14159265359
Jun 22 '16 at 9:26




@MrLemon oh, ok
– user3.14159265359
Jun 22 '16 at 9:26










1 Answer
1






active

oldest

votes


















0














I redid the command blocks and got a much better, but still not excellent solution:



Look! Some orange squares!



Now, what the command blocks have:



1:



/testfor @e[type=ArmorStand]


2:



/execute @a ~ ~ ~ testfor @e[type=ArmorStand,r=0]


3:



/execute @a ~ ~ ~ summon ArmorStand ~ ~ ~


4:



/kill @e[type=ArmorStand]


5:



/tp @a @e[type=ArmorStand]


Notes:




  • Sorry for not using the 1.9 Command blocks, because I really don't know how to do this with them.






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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f270894%2fhow-do-i-test-when-a-player-moves-forward%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









    0














    I redid the command blocks and got a much better, but still not excellent solution:



    Look! Some orange squares!



    Now, what the command blocks have:



    1:



    /testfor @e[type=ArmorStand]


    2:



    /execute @a ~ ~ ~ testfor @e[type=ArmorStand,r=0]


    3:



    /execute @a ~ ~ ~ summon ArmorStand ~ ~ ~


    4:



    /kill @e[type=ArmorStand]


    5:



    /tp @a @e[type=ArmorStand]


    Notes:




    • Sorry for not using the 1.9 Command blocks, because I really don't know how to do this with them.






    share|improve this answer


























      0














      I redid the command blocks and got a much better, but still not excellent solution:



      Look! Some orange squares!



      Now, what the command blocks have:



      1:



      /testfor @e[type=ArmorStand]


      2:



      /execute @a ~ ~ ~ testfor @e[type=ArmorStand,r=0]


      3:



      /execute @a ~ ~ ~ summon ArmorStand ~ ~ ~


      4:



      /kill @e[type=ArmorStand]


      5:



      /tp @a @e[type=ArmorStand]


      Notes:




      • Sorry for not using the 1.9 Command blocks, because I really don't know how to do this with them.






      share|improve this answer
























        0












        0








        0






        I redid the command blocks and got a much better, but still not excellent solution:



        Look! Some orange squares!



        Now, what the command blocks have:



        1:



        /testfor @e[type=ArmorStand]


        2:



        /execute @a ~ ~ ~ testfor @e[type=ArmorStand,r=0]


        3:



        /execute @a ~ ~ ~ summon ArmorStand ~ ~ ~


        4:



        /kill @e[type=ArmorStand]


        5:



        /tp @a @e[type=ArmorStand]


        Notes:




        • Sorry for not using the 1.9 Command blocks, because I really don't know how to do this with them.






        share|improve this answer












        I redid the command blocks and got a much better, but still not excellent solution:



        Look! Some orange squares!



        Now, what the command blocks have:



        1:



        /testfor @e[type=ArmorStand]


        2:



        /execute @a ~ ~ ~ testfor @e[type=ArmorStand,r=0]


        3:



        /execute @a ~ ~ ~ summon ArmorStand ~ ~ ~


        4:



        /kill @e[type=ArmorStand]


        5:



        /tp @a @e[type=ArmorStand]


        Notes:




        • Sorry for not using the 1.9 Command blocks, because I really don't know how to do this with them.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jun 29 '16 at 11:05









        user3.14159265359

        4,92772670




        4,92772670






























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f270894%2fhow-do-i-test-when-a-player-moves-forward%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

            Михайлов, Христо

            Центральная группа войск

            Троллейбус