Mar 25, 2024 05:58:07
How do I make script know multiple items from list instead of just 1?
view on scratch
view on legacy ocular
MrKingofScratch
loading
set [i v] to [1]or
repeat (length of [list v] :: list)
if <[(answer) v] contains (item (i) of [list v] :: list) ?> then
output true somehow (could set a var or maybe broadcast a message)
stop [this script v]
end
change [i v] by (1)
end
output false somehow (could set a var or maybe broadcast a message)
set [i v] to [1]either will work. The top is most useful in a custom block. Also the “contains” block should be green and can be found in the operations section in 3.0.
repeat until <<(i) > (length of [list v] :: list))> or <[(answer) v] contains (item (i) of [list v] :: list) ?>>
change [i v] by (1)
end
if <[(answer) v] contains (item (i) of [list v] :: list) ?> then
output true
else
output false
end