Discuss Scratch
- Discussion Forums
- » Show and Tell
- » documentation of unofficial blocks, extensions for the <key [ v] pressed?> block and previous/random costume block
- space_elephant
- Scratcher
500+ posts
documentation of unofficial blocks, extensions for the <key [ v] pressed?> block and previous/random costume block
while <>{}//run stack blocks until boolean is falseyou can get these here
for each [ v] in (){}//like the repeat block except counting in variable named in the first input
clear counter//sets the counter to 0
incr counter//changes the counter by 1
(noop ::)//returns the counter
(undefined ::)//returns the costume name
<loud?>//returns true if it is loud
the extensions for the <key [ v] pressed?> block are there too.
Here are some useful custom blocks in that project.
define previous costume
switch costume to [previous costume v]
define switch costume to(number)before last costume
switch costume to((1)-(number))
define random costume
switch costume to(1)before last costume//this swiches the costume to the last costume
switch costume to(pick random (1) to (costume #))
Last edited by space_elephant (Aug. 29, 2016 17:59:22)
- Gabriel2900
- Scratcher
100+ posts
documentation of unofficial blocks, extensions for the <key [ v] pressed?> block and previous/random costume block
Don't Forget:
Say nothing:: looks
- space_elephant
- Scratcher
500+ posts
documentation of unofficial blocks, extensions for the <key [ v] pressed?> block and previous/random costume block
I only put in blocks that still function. Don't Forget:Say nothing:: looks
- Gabriel2900
- Scratcher
100+ posts
documentation of unofficial blocks, extensions for the <key [ v] pressed?> block and previous/random costume block
A lot of these are workaround able like:
repeat until <not <>>
end
set [ v] to [0]
repeat until <(variable) = [...]>
...
change [ v] by (1)
end
set [ counter v] to [0]
change [counter v] by (1)
(counter)
([costume name v] of [ v]::sensing)
<(loudness) > [...]>
Last edited by Gabriel2900 (March 5, 2017 01:06:00)
- space_elephant
- Scratcher
500+ posts
documentation of unofficial blocks, extensions for the <key [ v] pressed?> block and previous/random costume block
All but one have some problems with workarounds though. A lot of these are workaround able:repeat until <not <>>
end
while<...>{as
...
}
repeat until<not<...>>works but the workaround for the “for each” block
...
set[variable v]to[0]doesn't work because the workaround does something difrent if the C-mouth changes the variable, counter doesn't interfere with any variables unlike using a variable, we don't know what the threshhold is for the “loud” block and the costume name block just has no workaround.
repeat(...::grey)
change[variable v]by(1)
...
- Discussion Forums
- » Show and Tell
- » documentation of unofficial blocks, extensions for the <key [ v] pressed?> block and previous/random costume block