fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Turn ON/OFF blocks with connections-links (not numbers)

    Questions & Answers
    4
    10
    2400
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      David197 last edited by

      Hello,

      In the "help box" from the Turn ON/OFF blocks it says that I have to indicate the ID of the blocks i want to swith ON or OFF.

      Can I do it by linking the Turn ON/OFF blocks directly to the blocks I need to turn ON or OFF?

      Thank you,
      David R

      timmyhanke Andermaiden2nd 2 Replies Last reply Reply Quote 0
      • timmyhanke
        timmyhanke @David197 last edited by

        @david197

        First you have to try it otherwise it's pointless .

        Otherwise you put in the id's numbers in the block you want to turn off and on .

        D 1 Reply Last reply Reply Quote 0
        • Andermaiden2nd
          Andermaiden2nd @David197 last edited by

          @david197 linking a block after the turn on/off block will only execute said block. If you don't write the ID of the block you want to turn on/off in the specified input field (of that turn on/off block) then that block won't do anything.

          1 Reply Last reply Reply Quote 0
          • D
            David197 @timmyhanke last edited by

            @timmyhanke Yeap, I tried, linking doesn't work.
            Thanks

            timmyhanke 1 Reply Last reply Reply Quote 0
            • timmyhanke
              timmyhanke @David197 last edited by

              @david197

              Linking will work as you want to if you write the block number that you want to link to in the block itself . ☺

              D 1 Reply Last reply Reply Quote 0
              • D
                David197 @timmyhanke last edited by

                So, have I to both linking AND writing the blocks ID?

                thank you,

                timmyhanke 1 Reply Last reply Reply Quote 0
                • timmyhanke
                  timmyhanke @David197 last edited by

                  @david197

                  the block only work with the number id in it , so if you want to link them so you easy can see what triggers what you can do that , but only if you write the id to the block below it .

                  1 Reply Last reply Reply Quote 0
                  • fxDreema
                    fxDreema last edited by

                    Let's say that you turned off some blocks in the project and they are glowing red. Now in the output code, somewhere in OnInit() those blocks are marked as disabled blocks. Which means that their code exists, but when they are called and their __disabled parameter is checked and its value is true, their code is simply not executed.

                    With these ON/OFF blocks you can basically affect this __disabled parameter for each block. What you need is the id of the block. And in this case I recommend to give some id that is not numeric. Yes, block numbers can be... not numbers 🙂 Try with some short word that means something to you.

                    I see many AND and OR blocks in your project. Those AND blocks are not needed, I think it's much better idea to connect 2 blocks one after another instead of using AND.

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      David197 @fxDreema last edited by

                      @fxdreema
                      Thank you!

                      Now I'm a little confused, I thought the Block ID was the number on the left of the title of the block... isn't it?
                      that number is used for execution order management, right?

                      Thank you for the idea for avoiding the AND blocks, for the moment I will let them there because now I have a lot of other challenges to solve, but in the future maybe I will delete them, specially if it implies less calculation/load to the algorithm, do them add extra load to the EA?

                      Thank you,
                      David R.

                      1 Reply Last reply Reply Quote 0
                      • D
                        David197 last edited by

                        Hello,
                        I still have 2 questions:

                        how can the ID be a string and also be used to sort the execution of the blocks?

                        and, does the AND block add a significant amount of load to the processing of the EA?

                        Thank you,
                        David R.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        Online Users

                        A
                        T
                        M
                        E
                        C
                        B

                        18
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors