Discuss Scratch

rukiddingme2
New to Scratch
4 posts

How to set the input variable of a define block?

How do I set the input in a “define” block?
It's basically like this:
define do this to (variable)
set [variable v] to (item (1 v) of [string v] :: list)
set [index v] to (1)
repeat ((length of [string v] :: list) - (1))
change [index v] by (1)
set [variable v] to (join (variable) (item (index) of [string v] :: list))
end
And i want to make all the “set variable” the input variable of the define block instead of a definite “variable” variable (stroke-inducing, I know)
awesome-llama
Scratcher
1000+ posts

How to set the input variable of a define block?

If you are asking how to do this…

set (variable ::custom) to []

It isn't possible in the current version of Scratch. The dropdown fields for blocks are handled differently to other inputs and no block can fit into it.

You may want to look into storing data in lists and instead of using a variable name you use a list item number.


rukiddingme2
New to Scratch
4 posts

How to set the input variable of a define block?

That block is absolutely what i am needing rn, thanks for letting know, i'll find a workaround for this

Powered by DjangoBB