Turn ON/OFF blocks with connections-links (not numbers)
-
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 -
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 .
-
@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.
-
@timmyhanke Yeap, I tried, linking doesn't work.
Thanks -
Linking will work as you want to if you write the block number that you want to link to in the block itself .

-
So, have I to both linking AND writing the blocks ID?
thank you,
-
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 .
-
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.
-
@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. -
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.