Tips with Coding

Hello! I'd like some help, as I don't understand how to use BYOB. It's as if these blocks are speaking Chinese. Can someone help me understand this better?

Here are a few examples of what I don't understand:
Screenshot 2023-12-22 03.02.07|440x254

warp: Makes the script run faster

if then else: Just like if, but instead of running different scripts depending on the Boolean, they output different values.
(if < true::operators > then [yes] else [no]::control) // returns yes
(if < false::operators > then [yes] else [no]::control) // returns no

this script: Try this script. It'll say the script you just made. Tell me if you need help for other options in this block.
move (10) steps
say (this [script v]::control)

when anything is edited: Runs if you edit the script.

define block: A metaprogramming block, allows you to create a block while running a script. You can read the manual link at the bottom of the post.

set label of block: Another metaprogramming block.

run: Place a script inside the gray/grey ring. It just runs the script.

launch: Like run but doesn't pause the current script.

call: It just outputs. Try putting a x position block or something and it still returns x position. It may sound useless, but you can read the manual link at the bottom of the post and you'll understand why we need this block.

pipe: Does multiple reporters. For example:

So I gave the base number 12345, and this block puts the number 12345 into empty slots of the ringed blocks. It first adds 10, which equals to 12355, then it subtracts 12300, which is now 55.

But, if you're still confused, you can see the Snap! Reference Manual .

If you need more help, tell me!

It puts 12345 in the empty slot of the first ringed expression. It puts the value of that expression into the empty slot of the second expression, etc. So you have 12345+10 = 12355, then 12355-12300=55

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.