(Sensing Blocks)
(Experimental Control Blocks in 2.0: Fixing the cruddy grammar. Haven't fixed the For Each () in () block because I jave no idea what the article is trying to say :()
Line 40: Line 40:
  
 
==Experimental Control Blocks in 2.0==
 
==Experimental Control Blocks in 2.0==
Recently, there were 5 experimental blocks in the control category available in Scratch 2.0 are still left over but still can be used, as they are still red. In alpha versions, these blocks used to be a yellow-green color. The counter blocks were still introduced in the very first Scratch 2.0 (prealpha) versions as "While ()" and "For Each () in ()" were introduced in v138.<ref>http://scratch.mit.edu/projects/25344202/#editor</ref> 1 was reporter, 2 were stacks, and 2 were [[C Block]]s. They were:
+
Scratch 2.0 contains 5 extra experimental blocks not available through normal means. In alpha versions, these blocks used to be a yellow-green color. The counter blocks were introduced in the very first Scratch 2.0 (prealpha) versions, and "While ()" and "For Each () in ()" were introduced in v138.<ref>http://scratch.mit.edu/projects/25344202/#editor</ref> 1 is a reporter, 2 are stacks, and the other 2 are [[C Block]]s. They were:
 
*<sb>(counter) // category=control</sb> (currently called "noop" due to 2 copies of the block spec.)
 
*<sb>(counter) // category=control</sb> (currently called "noop" due to 2 copies of the block spec.)
 
*<sb>clear counter // category=control</sb>
 
*<sb>clear counter // category=control</sb>
Line 47: Line 47:
 
*[[File:For Each () in ().png|For Each () in ()]]
 
*[[File:For Each () in ().png|For Each () in ()]]
  
The '''Counter''' reporter block reports the value how many times the "Incr Counter" block is used. If "Clear Counter" is used, the value resets to 0. For some reason, this block is called "noop".
+
The '''Counter''' reporter block reports the value how many times the "Incr Counter" block is used. If "Clear Counter" is used, the value resets to 0.
  
 
The '''Clear Counter''' block resets the counter value to 0.
 
The '''Clear Counter''' block resets the counter value to 0.
Line 53: Line 53:
 
The '''Incr Counter''' block increases the counter value by 1.
 
The '''Incr Counter''' block increases the counter value by 1.
  
The '''While ()''' C block makes blocks held inside this block loop until the specified [[Boolean Block|boolean]] statement is false, which works like a [[Repeat Until () (block)|Repeat Until (Not ())]] block. The block has no repeat arrow for some reason, but still works.<ref>http://scratch.mit.edu/projects/1179517/#editor</ref>
+
The '''While ()''' C block makes blocks held inside this block loop until the specified [[Boolean Block|boolean]] statement is false, which works like a [[Repeat Until () (block)|Repeat Until (Not ())]] block.<ref>http://scratch.mit.edu/projects/1179517/#editor</ref>
  
The '''For Each () in ()''' C block works like the [[Repeat ()]] C block, except a variable that counts up each time the stack ran. For some reason, if you make a variable, a variable and the variable blocks will appear, but there are no variable choices in the block. Also, The number uses a string input instead of a number input. And as mentioned above, the block has no repeat arrow.<ref>http://scratch.mit.edu/projects/21950622/#editor</ref>
+
The '''For Each () in ()''' C block works like the [[Repeat ()]] C block, except a variable that counts up each time the stack ran. For some reason, if you make a variable, a variable and the variable blocks will appear, but there are no variable choices in the block. Also, The number uses a string input instead of a number input.<ref>http://scratch.mit.edu/projects/21950622/#editor</ref>
  
 
===Workarounds===
 
===Workarounds===

Revision as of 15:09, 30 October 2015

Experimental blocks were blocks that did not work well and therefore did not appear in the Block Palette. They were available from Scratch 1.0 through 1.2. In 1.0, they were accessed by shift-clicking the Extras menu and choosing "show experimental blocks"; in 1.1 and 1.2, through Shift-Click-R. They are similar to the Motor Blocks, which are also not displayed by default; however, the Motor blocks are fully functional.

Sound Blocks

The 13 experimental Sound blocks.

There were 13 experimental Sound Blocks. All were Stack-shaped. They were:

  • start movie // category=sound
  • stop movie // category=sound
  • change seconds by (1) // category=sound
  • set seconds to (0) // category=sound
  • change zoom by (10) // category=sound
  • set zoom to (100) % // category=sound
  • change horiz. pan by (10) // category=sound
  • set horiz. pan to (0) // category=sound
  • change vert. pan by (10) // category=sound
  • set vert. pan to (0) // category=sound
  • change fade by (10) // category=sound
  • set fade to (100) % // category=sound
  • set fade color to [#000000] // category=sound

The fade blocks were later changed to say "trans." (short for "transparent")[problematic].

These blocks were likely for use with the Scratch MoviePlayerMorph.

Sensing Blocks

The 9 experimental Sensing blocks

There were 9 experimental Sensing Blocks. 6 were Reporter Blocks, and 3 were Stacks. They were:

Note Note: The experimental sensing reporters appear to be a variable in the Scratchblocks generator below due to being not existed.
  • (camera motion) // category=sensing
  • (camera direction) // category=sensing
  • (camera relative x) // category=sensing
  • (camera relative y) // category=sensing
  • (camera absolute x) // category=sensing
  • (camera absolute y) // category=sensing
The readouts of the reporter blocks, all showing "a ScratchSpriteMorph()".
  • track motion // category=sensing
  • track color // category=sensing
  • auto calibrate red // category=sensing

These blocks appear to be intended for camera sensing, but in all version of Scratch include them, they do not work and their stage monitors simply display "a ScratchSpriteMorph()". True camera support was later added in Scratch 2.0.

Experimental Control Blocks in 2.0

Scratch 2.0 contains 5 extra experimental blocks not available through normal means. In alpha versions, these blocks used to be a yellow-green color. The counter blocks were introduced in the very first Scratch 2.0 (prealpha) versions, and "While ()" and "For Each () in ()" were introduced in v138.[1] 1 is a reporter, 2 are stacks, and the other 2 are C Blocks. They were:

  • (counter) // category=control (currently called "noop" due to 2 copies of the block spec.)
  • clear counter // category=control
  • incr counter // category=control
  • While ()
  • For Each () in ()

The Counter reporter block reports the value how many times the "Incr Counter" block is used. If "Clear Counter" is used, the value resets to 0.

The Clear Counter block resets the counter value to 0.

The Incr Counter block increases the counter value by 1.

The While () C block makes blocks held inside this block loop until the specified boolean statement is false, which works like a Repeat Until (Not ()) block.[2]

The For Each () in () C block works like the Repeat () C block, except a variable that counts up each time the stack ran. For some reason, if you make a variable, a variable and the variable blocks will appear, but there are no variable choices in the block. Also, The number uses a string input instead of a number input.[3]

Workarounds

Because of the 5 blocks' straightforward function, all of those can be replicated with the following codes:

Counter

(counter) // Using a variable

Clear Counter

set [counter v] to [0]

Incr Counter

change [counter v] by (1)

While ()

repeat until <not <. . .>>
. . .
end

For Each () in ()

set [i v] to [0]
repeat ()
change [i v] by (1)
. . .
end

References

  1. http://scratch.mit.edu/projects/25344202/#editor
  2. http://scratch.mit.edu/projects/1179517/#editor
  3. http://scratch.mit.edu/projects/21950622/#editor

See Also