Discuss Scratch

  • Discussion Forums
  • » Show and Tell
  • » documentation of unofficial blocks, extensions for the <key [ v] pressed?> block and previous/random costume block [RSS Feed]
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 false

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
you can get these here
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)


red link
[url=redlink.com][color=red][u]red link[/u][/color][/url]
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

Gabriel2900 wrote:

Don't Forget:
Say nothing:: looks
I only put in blocks that still function.

red link
[url=redlink.com][color=red][u]red link[/u][/color][/url]
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

Gabriel2900 wrote:

A lot of these are workaround able:
repeat until <not <>>

end
All but one have some problems with workarounds though.
while<...>{
...
}
as
repeat until<not<...>>
...
works but the workaround for the “for each” block
set[variable v]to[0]
repeat(...::grey)
change[variable v]by(1)
...
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.

red link
[url=redlink.com][color=red][u]red link[/u][/color][/url]
  • Discussion Forums
  • » Show and Tell
  • » documentation of unofficial blocks, extensions for the <key [ v] pressed?> block and previous/random costume block [RSS Feed]

Powered by DjangoBB