Intro to Compressing Blocks 🟨

  1. Great topic cool
    1st like of them all yayayayay
  2. the concat. thing:

Concatenation
For more info visit this guide made by pimysz.

Using concatenation is very crucial. In a nutshell, it’s basically taking advantage of the create text with block, and the fact that when getting, broadcasting or setting a property/channel you use a text block.

This is mainly used to help get rid of a bunch of else if statements that is used to find the channel/property/property value you are looking for.

Example :smiley:
Lets say you want to set a random property of 8, 1.

Without concat.
So first, I would make a bunch of if and else if and the else statements to find if var (the variable carrying the random integer) and depending on each if it would set randomProp to the corresponding property text block.


Then, below that I would set the property with the randomProp variable, 1.

Not to repetitive or boring right :grin:
45 tasty blocks gone.

Welp, it can be shred to an amount of blocks that will blow your mind.

:exploding_head:


That, in and of itself is an if statement. Basically it sets the property “property” + random integer, 1. And you can make the property randomness even bigger, by changing the last block. No extra code with this required.

nomnomnom

  1. The guide had 46 likes today, now it has 50. Slim wanted to get to 50 likes to get great topic. (congrats)

@Slom @SlimExtraterrestrial, gonna add concatenation?

9 Likes