Discuss Scratch

100+ posts

join () () can be used to identify the variable or list name in data blocks

The join operator block should be able to be put in the variable selector of a data block so I can specify what variable I want to modify. This can be helpful when using a self-made Block.

For example, If I have a long stack of blocks meant to add text to two lists, instead of using the regular add item to list block and manually changing which list it gets added to by the drop down menu, I can do this:
(Player 1 :: list)
(Player 2 :: list)
add ["3948"] to Player [1]
add ["109"] to Player [2]
add ["2983"] to Player [1]
add ["1092"] to Player [2]

define add (block of text) to Player (Player #)
add (block of text) to (join [Player ] (Player #)

It's quicker to change a bit of text than swapping variable blocks, so it should help when you are duplicating a bunch of blocks that add an item to a list and then changing which list it should go in.

Last edited by BFDISuperFan (Jan. 25, 2019 01:26:18)

Oh hi signature reader! Thanks for reading this post. I’m BFDISuperFan, and I really love rhythm games. Oh, and while you’re here reading this, if you also like rhythm games, how about you go try out my attempt at porting DDRMAX2 on Scratch? Here’s the link: https://scratch.mit.edu/projects/120132146/

What? An evil kumquat? Eating signatures!? Haha, you come up with some funny things-
Hey, where did my closing signature go?

Powered by DjangoBB

Standard | Mobile