Discuss Scratch

Sairam1265
Scratcher
42 posts

Ultimate List of Workarounds And More

Please give me the workaround for this block.
(item # of [thing] in [list v] :: list)
Jonathan50
Scratcher
1000+ posts

Ultimate List of Workarounds And More

Sairam1265 wrote:

Please give me the workaround for this block.
(item # of [thing] in [list v] :: list)
This topic is meant for workarounds for blocks that do not exist in Scratch, but it'd be this:
set [index v] to [1]
repeat until <(item (index) of [list v]) = [thing]>
if <(index) = (length of [list v])> then
... // Not present.
end
change [index v] by (1)
end

Last edited by Jonathan50 (Feb. 12, 2019 08:38:19)

Sairam1265
Scratcher
42 posts

Ultimate List of Workarounds And More

Sorry I was asking for snap!
Sairam1265
Scratcher
42 posts

Ultimate List of Workarounds And More

This script doesn't works.
Sairam1265
Scratcher
42 posts

Ultimate List of Workarounds And More

thanks for help
but i need an another help
please give me the workaround for this reporter
[color v] :: looks reporter
and also its options for snap

Last edited by Sairam1265 (Feb. 23, 2019 10:41:25)

CodingKidz1544
Scratcher
39 posts

Ultimate List of Workarounds And More

DrKat123 wrote:

The workaround for a for/while oop:
set [i v] to [0 
repeat until <(i) = (45)>
...
change [i v] by (1)
end
Isn't that the same as
repeat (45)
...
end
?
also while is
repeat until <not <... ::gray>>
...
end
Shaymin524
Scratcher
68 posts

Ultimate List of Workarounds And More

Is there a way of doing the equivalent of:
go to (variable)
This block doesn't do anything currently, even when variable is the name of a sprite.
BumpSign
Scratcher
100+ posts

Ultimate List of Workarounds And More

Shaymin524 wrote:

Is there a way of doing the equivalent of:
go to (variable)
This block doesn't do anything currently, even when variable is the name of a sprite.
Since a variable's position cannot be changed throughout the course of a project, you could simply find the position of the variable and then input that into the “go to x: y:” block.
Shaymin524
Scratcher
68 posts

Ultimate List of Workarounds And More

BumpSign wrote:

Shaymin524 wrote:

Is there a way of doing the equivalent of:
go to (variable)
This block doesn't do anything currently, even when variable is the name of a sprite.
Since a variable's position cannot be changed throughout the course of a project, you could simply find the position of the variable and then input that into the “go to x: y:” block.
I mean going to the sprite with the name specified by the variable.
Jonathan50
Scratcher
1000+ posts

Ultimate List of Workarounds And More

Shaymin524 wrote:

I mean going to the sprite with the name specified by the variable.
It works for me There seems to be a similar issue with the Text to Speech extension. No other extensions seem to have the same problem…
ihgfedcba
Scratcher
100+ posts

Ultimate List of Workarounds And More

⌠(a) ::operators
│ x^(b) ::operators
⌡ 0 ::operators
(supposed to be one big reporter)

Workaround:

(([10^ v] of (((b)+(1))×([log v] of (a))::operators)::operators)÷((b)+(1)) ::operators)

Last edited by ihgfedcba (March 26, 2019 18:12:33)

TheWinner437
Scratcher
14 posts

Ultimate List of Workarounds And More

I need a “fade in” block.
--Explosion--
Scratcher
1000+ posts

Ultimate List of Workarounds And More

What would be a workaround to spliting a string at every certain character and adds it to a list ? I am working on a version now that goes through every character and if it is the choosen character then it adds the previour word to a list
ihgfedcba
Scratcher
100+ posts

Ultimate List of Workarounds And More

(derivative of x^(b) at x=(a)::operators)

Workaround:

((b) * ([10^ v] of (((b)-(1))×([log v] of (a))::operators)::operators))
horsejumper654
Scratcher
3 posts

Ultimate List of Workarounds And More

say [im with drkat123's message \/]
Moving from Scratch? Don't learn C or Java, try https://snap.berkeley.edu/
DaEpikDude
Scratcher
1000+ posts

Ultimate List of Workarounds And More

staffordboys wrote:

What would be a workaround to spliting a string at every certain character and adds it to a list ? I am working on a version now that goes through every character and if it is the choosen character then it adds the previour word to a list
define split (string) at (char) into list
delete (all v) of [list v]
set [i v] to [1]
set [current word v] to []
repeat (length of (string))
if <(letter (i) of (string)) = (char)> then
add (current word) to [list v]
set [current word v] to []
else
set [current word v] to (join (current word) (letter (i) of (string)))
end
change [i v] by (1)
end
if <not <(letter ((i) - (1)) of (string)) = (char)>> then //if it didn't just add the last word to the list
add (current word) to [list v]
end

(I think that works?)

note that this won't include the character in the string, so if you were splitting at commas then “a,b,c” would become the list:
- a
- b
- c
instead of
- a,
- b,
- c,
Kieave
Scratcher
54 posts

Ultimate List of Workarounds And More

edit - nevermind found one

Last edited by Kieave (April 6, 2019 04:04:51)

The_Imagineer_
Scratcher
100+ posts

Ultimate List of Workarounds And More

beep
ihgfedcba
Scratcher
100+ posts

Ultimate List of Workarounds And More

forever if <>{
} forever else{
}::control cap

Workaround:

forever
if<>then
else

Last edited by ihgfedcba (April 17, 2019 04:48:51)

Powered by DjangoBB